leap 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ Gemfile.lock
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source "http://rubygems.org"
2
2
 
3
- gemspec :path => '.'
3
+ gemspec
data/Rakefile CHANGED
@@ -1,27 +1,7 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "leap"
8
- gem.summary = %Q{A heuristics engine for your Ruby objects}
9
- gem.description = %Q{Leap to conclusions}
10
- gem.email = "andy@rossmeissl.net"
11
- gem.homepage = "http://github.com/rossmeissl/leap"
12
- gem.authors = ["Andy Rossmeissl", "Seamus Abshere"]
13
- gem.add_development_dependency "characterizable", ">=0.0.11"
14
- gem.add_development_dependency "shoulda", ">= 0"
15
- gem.add_development_dependency "jeweler", ">= 0"
16
- gem.add_dependency 'blockenspiel', '>=0.3.2'
17
- gem.add_dependency 'activesupport', '~> 3.0.0'
18
- gem.add_dependency 'builder', '~> 2.1.2'
19
- end
20
- Jeweler::GemcutterTasks.new
21
- rescue LoadError
22
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
23
- end
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
24
3
 
4
+ require 'rake'
25
5
  require 'rake/testtask'
26
6
  Rake::TestTask.new(:test) do |test|
27
7
  test.libs << 'lib' << 'test'
@@ -30,28 +10,14 @@ Rake::TestTask.new(:test) do |test|
30
10
  end
31
11
 
32
12
  begin
33
- require 'rcov/rcovtask'
34
- Rcov::RcovTask.new do |test|
35
- test.libs << 'test'
36
- test.pattern = 'test/**/test_*.rb'
37
- test.verbose = true
13
+ require 'rake/rdoctask'
14
+ Rake::RDocTask.new do |rdoc|
15
+ rdoc.rdoc_dir = 'rdoc'
16
+ rdoc.title = 'leap'
17
+ rdoc.options << '--line-numbers' << '--inline-source'
18
+ rdoc.rdoc_files.include('README*')
19
+ rdoc.rdoc_files.include('lib/**/*.rb')
38
20
  end
39
21
  rescue LoadError
40
- task :rcov do
41
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
42
- end
43
- end
44
-
45
- task :test => :check_dependencies
46
-
47
- task :default => :test
48
-
49
- require 'rake/rdoctask'
50
- Rake::RDocTask.new do |rdoc|
51
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
52
-
53
- rdoc.rdoc_dir = 'rdoc'
54
- rdoc.title = "leap #{version}"
55
- rdoc.rdoc_files.include('README*')
56
- rdoc.rdoc_files.include('lib/**/*.rb')
22
+ puts "Rdoc is not available"
57
23
  end
data/leap.gemspec CHANGED
@@ -1,86 +1,27 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "leap/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{leap}
8
- s.version = "0.4.5"
6
+ s.name = "leap"
7
+ s.version = Leap::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Andy Rossmeissl", "Seamus Abshere"]
10
+ s.email = "andy@rossmeissl.net"
11
+ s.homepage = "http://github.com/rossmeissl/leap"
12
+ s.summary = %Q{A heuristics engine for your Ruby objects}
13
+ s.description = %Q{Leap to conclusions}
9
14
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Andy Rossmeissl", "Seamus Abshere"]
12
- s.date = %q{2010-11-04}
13
- s.description = %q{Leap to conclusions}
14
- s.email = %q{andy@rossmeissl.net}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "leap.gemspec",
29
- "lib/leap.rb",
30
- "lib/leap/committee.rb",
31
- "lib/leap/core_ext.rb",
32
- "lib/leap/decision.rb",
33
- "lib/leap/deliberation.rb",
34
- "lib/leap/implicit_attributes.rb",
35
- "lib/leap/quorum.rb",
36
- "lib/leap/report.rb",
37
- "lib/leap/subject.rb",
38
- "lib/leap/xml_serializer.rb",
39
- "test/helper.rb",
40
- "test/leap/test_committee.rb",
41
- "test/leap/test_quorum.rb",
42
- "test/leap/test_report.rb",
43
- "test/test_leap.rb"
44
- ]
45
- s.homepage = %q{http://github.com/rossmeissl/leap}
46
- s.rdoc_options = ["--charset=UTF-8"]
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
47
18
  s.require_paths = ["lib"]
48
- s.rubygems_version = %q{1.3.7}
49
- s.summary = %q{A heuristics engine for your Ruby objects}
50
- s.test_files = [
51
- "test/leap/test_report.rb",
52
- "test/leap/test_committee.rb",
53
- "test/leap/test_quorum.rb",
54
- "test/test_leap.rb",
55
- "test/helper.rb"
56
- ]
57
-
58
- if s.respond_to? :specification_version then
59
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
60
- s.specification_version = 3
61
-
62
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
63
- s.add_development_dependency(%q<characterizable>, [">= 0.0.11"])
64
- s.add_development_dependency(%q<shoulda>, [">= 0"])
65
- s.add_development_dependency(%q<jeweler>, [">= 0"])
66
- s.add_runtime_dependency(%q<blockenspiel>, [">= 0.3.2"])
67
- s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
68
- s.add_runtime_dependency(%q<builder>, ["~> 2.1.2"])
69
- else
70
- s.add_dependency(%q<characterizable>, [">= 0.0.11"])
71
- s.add_dependency(%q<shoulda>, [">= 0"])
72
- s.add_dependency(%q<jeweler>, [">= 0"])
73
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
74
- s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
75
- s.add_dependency(%q<builder>, ["~> 2.1.2"])
76
- end
77
- else
78
- s.add_dependency(%q<characterizable>, [">= 0.0.11"])
79
- s.add_dependency(%q<shoulda>, [">= 0"])
80
- s.add_dependency(%q<jeweler>, [">= 0"])
81
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
82
- s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
83
- s.add_dependency(%q<builder>, ["~> 2.1.2"])
84
- end
19
+
20
+ s.add_development_dependency "characterizable", ">=0.0.11"
21
+ s.add_development_dependency "shoulda"
22
+ s.add_dependency 'blockenspiel', '>=0.3.2'
23
+ s.add_dependency 'activesupport', '>=2.3.4'
24
+ # sabshere 1/27/11 for activesupport - http://groups.google.com/group/ruby-bundler/browse_thread/thread/b4a2fc61ac0b5438
25
+ s.add_dependency 'i18n'
26
+ s.add_dependency 'builder'
85
27
  end
86
-
@@ -0,0 +1,3 @@
1
+ module Leap
2
+ VERSION = '0.4.6'
3
+ end
@@ -8,15 +8,15 @@ module Leap
8
8
  xml = options[:builder] ||= Builder::XmlMarkup.new(options)
9
9
  xml.instruct! unless options[:skip_instruct]
10
10
  yield xml
11
- xml.to_s
11
+ xml
12
12
  end
13
13
 
14
14
  def array_to_xml(xml, name, array, singular_name = name.to_s.singularize)
15
- xml.send name, :type => 'array' do |subblock|
15
+ xml.__send__ name, :type => 'array' do |subblock|
16
16
  array.each do |item|
17
17
  if item.is_a? Symbol or !item.respond_to?(:to_xml)
18
18
  item = item.to_s if item.is_a?(Symbol)
19
- subblock.send singular_name, item, :type => 'string'
19
+ subblock.__send__ singular_name, item, :type => 'string'
20
20
  else
21
21
  item.to_xml(:builder => subblock, :skip_instruct => true)
22
22
  end
data/test/helper.rb CHANGED
@@ -1,11 +1,13 @@
1
1
  require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.setup
2
4
  require 'test/unit'
3
5
  require 'shoulda'
4
6
  require 'characterizable'
5
7
 
6
8
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
9
  $LOAD_PATH.unshift(File.dirname(__FILE__))
8
- require 'leap'
10
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'leap'))
9
11
 
10
12
  class Test::Unit::TestCase
11
13
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leap
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 3
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 4
8
- - 5
9
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
10
11
  platform: ruby
11
12
  authors:
12
13
  - Andy Rossmeissl
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-11-04 00:00:00 -04:00
19
+ date: 2011-01-27 00:00:00 -06:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -26,6 +27,7 @@ dependencies:
26
27
  requirements:
27
28
  - - ">="
28
29
  - !ruby/object:Gem::Version
30
+ hash: 9
29
31
  segments:
30
32
  - 0
31
33
  - 0
@@ -41,52 +43,56 @@ dependencies:
41
43
  requirements:
42
44
  - - ">="
43
45
  - !ruby/object:Gem::Version
46
+ hash: 3
44
47
  segments:
45
48
  - 0
46
49
  version: "0"
47
50
  type: :development
48
51
  version_requirements: *id002
49
52
  - !ruby/object:Gem::Dependency
50
- name: jeweler
53
+ name: blockenspiel
51
54
  prerelease: false
52
55
  requirement: &id003 !ruby/object:Gem::Requirement
53
56
  none: false
54
57
  requirements:
55
58
  - - ">="
56
59
  - !ruby/object:Gem::Version
60
+ hash: 23
57
61
  segments:
58
62
  - 0
59
- version: "0"
60
- type: :development
63
+ - 3
64
+ - 2
65
+ version: 0.3.2
66
+ type: :runtime
61
67
  version_requirements: *id003
62
68
  - !ruby/object:Gem::Dependency
63
- name: blockenspiel
69
+ name: activesupport
64
70
  prerelease: false
65
71
  requirement: &id004 !ruby/object:Gem::Requirement
66
72
  none: false
67
73
  requirements:
68
74
  - - ">="
69
75
  - !ruby/object:Gem::Version
76
+ hash: 11
70
77
  segments:
71
- - 0
72
- - 3
73
78
  - 2
74
- version: 0.3.2
79
+ - 3
80
+ - 4
81
+ version: 2.3.4
75
82
  type: :runtime
76
83
  version_requirements: *id004
77
84
  - !ruby/object:Gem::Dependency
78
- name: activesupport
85
+ name: i18n
79
86
  prerelease: false
80
87
  requirement: &id005 !ruby/object:Gem::Requirement
81
88
  none: false
82
89
  requirements:
83
- - - ~>
90
+ - - ">="
84
91
  - !ruby/object:Gem::Version
92
+ hash: 3
85
93
  segments:
86
- - 3
87
94
  - 0
88
- - 0
89
- version: 3.0.0
95
+ version: "0"
90
96
  type: :runtime
91
97
  version_requirements: *id005
92
98
  - !ruby/object:Gem::Dependency
@@ -95,13 +101,12 @@ dependencies:
95
101
  requirement: &id006 !ruby/object:Gem::Requirement
96
102
  none: false
97
103
  requirements:
98
- - - ~>
104
+ - - ">="
99
105
  - !ruby/object:Gem::Version
106
+ hash: 3
100
107
  segments:
101
- - 2
102
- - 1
103
- - 2
104
- version: 2.1.2
108
+ - 0
109
+ version: "0"
105
110
  type: :runtime
106
111
  version_requirements: *id006
107
112
  description: Leap to conclusions
@@ -110,18 +115,15 @@ executables: []
110
115
 
111
116
  extensions: []
112
117
 
113
- extra_rdoc_files:
114
- - LICENSE
115
- - README.rdoc
118
+ extra_rdoc_files: []
119
+
116
120
  files:
117
121
  - .document
118
122
  - .gitignore
119
123
  - Gemfile
120
- - Gemfile.lock
121
124
  - LICENSE
122
125
  - README.rdoc
123
126
  - Rakefile
124
- - VERSION
125
127
  - leap.gemspec
126
128
  - lib/leap.rb
127
129
  - lib/leap/committee.rb
@@ -132,6 +134,7 @@ files:
132
134
  - lib/leap/quorum.rb
133
135
  - lib/leap/report.rb
134
136
  - lib/leap/subject.rb
137
+ - lib/leap/version.rb
135
138
  - lib/leap/xml_serializer.rb
136
139
  - test/helper.rb
137
140
  - test/leap/test_committee.rb
@@ -143,8 +146,8 @@ homepage: http://github.com/rossmeissl/leap
143
146
  licenses: []
144
147
 
145
148
  post_install_message:
146
- rdoc_options:
147
- - --charset=UTF-8
149
+ rdoc_options: []
150
+
148
151
  require_paths:
149
152
  - lib
150
153
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -152,6 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
155
  requirements:
153
156
  - - ">="
154
157
  - !ruby/object:Gem::Version
158
+ hash: 3
155
159
  segments:
156
160
  - 0
157
161
  version: "0"
@@ -160,6 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
164
  requirements:
161
165
  - - ">="
162
166
  - !ruby/object:Gem::Version
167
+ hash: 3
163
168
  segments:
164
169
  - 0
165
170
  version: "0"
@@ -171,8 +176,8 @@ signing_key:
171
176
  specification_version: 3
172
177
  summary: A heuristics engine for your Ruby objects
173
178
  test_files:
174
- - test/leap/test_report.rb
179
+ - test/helper.rb
175
180
  - test/leap/test_committee.rb
176
181
  - test/leap/test_quorum.rb
182
+ - test/leap/test_report.rb
177
183
  - test/test_leap.rb
178
- - test/helper.rb
data/Gemfile.lock DELETED
@@ -1,26 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- leap (0.4.3)
5
- activesupport (>= 3.0.0.beta2)
6
- blockenspiel (>= 0.3.2)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- activesupport (3.0.1)
12
- blockenspiel (0.4.1)
13
- characterizable (0.0.17)
14
- activesupport (>= 2.3.5)
15
- blockenspiel (>= 0.3.2)
16
- shoulda (2.11.3)
17
-
18
- PLATFORMS
19
- ruby
20
-
21
- DEPENDENCIES
22
- activesupport (>= 3.0.0.beta2)
23
- blockenspiel (>= 0.3.2)
24
- characterizable (>= 0.0.11)
25
- leap!
26
- shoulda
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.4.5