diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..fa7d4d2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "http://rubygems.org" +gem "ffi" +gem "activesupport" +gem "rspec", :require => "spec" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..8c40905 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,26 @@ +GEM + remote: http://rubygems.org/ + specs: + activesupport (3.2.3) + i18n (~> 0.6) + multi_json (~> 1.0) + diff-lcs (1.1.3) + ffi (1.0.11) + i18n (0.6.0) + multi_json (1.3.5) + rspec (2.10.0) + rspec-core (~> 2.10.0) + rspec-expectations (~> 2.10.0) + rspec-mocks (~> 2.10.0) + rspec-core (2.10.1) + rspec-expectations (2.10.0) + diff-lcs (~> 1.1.3) + rspec-mocks (2.10.1) + +PLATFORMS + ruby + +DEPENDENCIES + activesupport + ffi + rspec diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..ab4457e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,22 @@ +Copyright (c) 2012 Thiago Morello + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Rakefile b/Rakefile index 9dc6901..cf60837 100644 --- a/Rakefile +++ b/Rakefile @@ -1,53 +1,2 @@ -$:.unshift(File.dirname(__FILE__) + "/lib") - -require "rake" -require "rspec/core/rake_task" -require "rrd/version" - -begin - require "hanna/rdoctask" -rescue LoadError => e - require "rake/rdoctask" -end - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "rrd-ffi" - gem.version = RRD::Version::STRING - gem.summary = %Q{RRDTool gem using librrd and ffi} - gem.description = %Q{Provides bindings for many RRD functions (using ffi gem and librrd), as well as DSLs for graphic and rrd building. You must have librrd in your system!} - gem.email = "morellon@gmail.com" - gem.homepage = "http://github.com/morellon/rrd-ffi" - gem.authors = ["morellon"] - gem.add_development_dependency "rspec" - gem.add_dependency "ffi" - gem.add_dependency "activesupport" - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler not available. Install it with: gem install jeweler" -end - -desc 'Run the specs' -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = 'spec/**/*_spec.rb' -end - -desc "Rspec : run all with RCov" -RSpec::Core::RakeTask.new('spec:rcov') do |t| - t.pattern = 'spec/**/*_spec.rb' - t.rcov = true - t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec'] -end - -Rake::RDocTask.new do |rdoc| - rdoc.main = "README.rdoc" - rdoc.rdoc_dir = "doc" - rdoc.title = "RRD" - rdoc.options += %w[ --line-numbers --inline-source --charset utf-8 ] - rdoc.rdoc_files.include("README.rdoc", "CHANGELOG.rdoc") - rdoc.rdoc_files.include("lib/**/*.rb") -end - -task :default => :spec +#!/usr/bin/env rake +require "bundler/gem_tasks" \ No newline at end of file diff --git a/rrd-ffi.gemspec b/rrd-ffi.gemspec index 8146ef1..c9a62cf 100644 --- a/rrd-ffi.gemspec +++ b/rrd-ffi.gemspec @@ -1,62 +1,17 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- +require File.expand_path('../lib/rrd/version', __FILE__) -Gem::Specification.new do |s| - s.name = "rrd-ffi" - s.version = "0.2.10" +Gem::Specification.new do |gem| + gem.authors = ["Thiago Morello"] + gem.email = ["morellon@gmail.com"] + gem.description = %q{Provides bindings for many RRD functions (using ffi gem and librrd), as well as DSLs for graphic and rrd building. You must have librrd in your system!} + gem.summary = %q{DSL + Bindings for librrd using FFI} + gem.homepage = "" - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["morellon"] - s.date = "2012-04-12" - s.description = "Provides bindings for many RRD functions (using ffi gem and librrd), as well as DSLs for graphic and rrd building. You must have librrd in your system!" - s.email = "morellon@gmail.com" - s.extra_rdoc_files = [ - "README.rdoc" - ] - s.files = [ - "CHANGELOG.rdoc", - "README.rdoc", - "Rakefile", - "examples/all.rb", - "lib/rrd.rb", - "lib/rrd/base.rb", - "lib/rrd/builder.rb", - "lib/rrd/graph.rb", - "lib/rrd/time_extension.rb", - "lib/rrd/version.rb", - "lib/rrd/wrapper.rb", - "rrd-ffi.gemspec", - "spec/rrd/base_spec.rb", - "spec/rrd/builder_spec.rb", - "spec/rrd/graph_spec.rb", - "spec/rrd/wrapper_spec.rb", - "spec/rrd_spec.rb", - "spec/spec_helper.rb", - "spec/vm.xml" - ] - s.homepage = "http://github.com/morellon/rrd-ffi" - s.require_paths = ["lib"] - s.rubygems_version = "1.8.10" - s.summary = "RRDTool gem using librrd and ffi" - - if s.respond_to? :specification_version then - s.specification_version = 3 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_development_dependency(%q, [">= 0"]) - s.add_runtime_dependency(%q, [">= 0"]) - s.add_runtime_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end + gem.files = `git ls-files`.split($\) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.name = "lele" + gem.require_paths = ["lib"] + gem.version = RRD::Version::STRING end -