pickle 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/Rakefile +14 -89
- data/Rakefile.d/cucumber.rake +24 -0
- data/Rakefile.d/jeweller.rake +19 -0
- data/Rakefile.d/rcov.rake +18 -0
- data/Rakefile.d/rspec.rake +7 -0
- data/Rakefile.d/yard.rake +5 -0
- data/VERSION +1 -1
- data/lib/pickle/adapter.rb +8 -1
- data/lib/pickle/version.rb +5 -2
- data/pickle.gemspec +6 -1
- data/spec/pickle/adapter_spec.rb +1 -1
- data/spec/pickle/email_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +7 -2
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 0.2.10
|
2
|
+
|
3
|
+
* 2 improvements
|
4
|
+
* pickle backend is rails 3 compatible (but generators are not yet)
|
5
|
+
* modular Rakefile, devs can run only what they're interested in without having to install all gems
|
6
|
+
|
7
|
+
|
1
8
|
== 0.2.9 - 27 Apr 2010 (the #railscamp7 release)
|
2
9
|
|
3
10
|
* 5 improvements
|
data/Rakefile
CHANGED
@@ -1,95 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
task :default => [:spec]
|
15
|
-
|
16
|
-
desc "Run the specs for #{PluginName}"
|
17
|
-
Spec::Rake::SpecTask.new(:spec) do |t|
|
18
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
19
|
-
t.spec_opts = ["--colour"]
|
20
|
-
end
|
21
|
-
|
22
|
-
desc "Generate RCov report for #{PluginName}"
|
23
|
-
Spec::Rake::SpecTask.new(:rcov) do |t|
|
24
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
25
|
-
t.rcov = true
|
26
|
-
t.rcov_dir = 'doc/coverage'
|
27
|
-
t.rcov_opts = ['--text-report', '--exclude', "gems/,features/,/Library,spec/,rcov.rb,#{File.expand_path(File.join(File.dirname(__FILE__),'../../..'))}"]
|
28
|
-
end
|
29
|
-
|
30
|
-
namespace :rcov do
|
31
|
-
desc "Verify RCov threshold for #{PluginName}"
|
32
|
-
RCov::VerifyTask.new(:verify => :rcov) do |t|
|
33
|
-
t.threshold = 98.29
|
34
|
-
t.index_html = File.join(File.dirname(__FILE__), 'doc/coverage/index.html')
|
1
|
+
$:.unshift File.expand_path('lib')
|
2
|
+
|
3
|
+
# load given tasks file, reporting errors without failing
|
4
|
+
def load_tasks(tasks)
|
5
|
+
load tasks
|
6
|
+
rescue Exception => exception
|
7
|
+
$stderr << "** loading #{tasks.sub(File.expand_path('.'),'')} failed: "
|
8
|
+
case exception
|
9
|
+
when LoadError
|
10
|
+
$stderr << "to use, install the gems it requires\n"
|
11
|
+
else
|
12
|
+
$stderr << ([exception.message] + exception.backtrace[0..2]).join("\n ") << "\n\n"
|
35
13
|
end
|
36
14
|
end
|
37
15
|
|
38
|
-
|
39
|
-
Cucumber::Rake::Task.new(:cucumber => [:cucumber_test_app]) do |t|
|
40
|
-
t.cucumber_opts = ['--format', 'pretty', '--require', 'features']
|
41
|
-
end
|
16
|
+
Dir["Rakefile.d/*.rake"].sort.each {|t| load_tasks t}
|
42
17
|
|
43
|
-
|
44
|
-
file "cucumber_test_app" do
|
45
|
-
puts "** setting up cucumber test app ** (rails 2.3 only at present)"
|
46
|
-
Rake::Task['cucumber:setup'].invoke
|
47
|
-
end
|
48
|
-
|
49
|
-
namespace :cucumber do
|
50
|
-
task :setup do
|
51
|
-
rm_rf "cucumber_test_app"
|
52
|
-
sh "rails cucumber_test_app"
|
53
|
-
cd "cucumber_test_app" do
|
54
|
-
sh "script/generate rspec"
|
55
|
-
sh "script/generate cucumber"
|
56
|
-
end
|
57
|
-
sh "ln -s #{File.expand_path('.')} cucumber_test_app/vendor/plugins/pickle"
|
58
|
-
end
|
59
|
-
end
|
18
|
+
task :default => :spec
|
60
19
|
|
61
20
|
task :ci => ['rcov:verify', 'cucumber']
|
62
|
-
|
63
|
-
begin
|
64
|
-
require 'jeweler'
|
65
|
-
|
66
|
-
Jeweler::Tasks.new do |s|
|
67
|
-
s.name = "pickle"
|
68
|
-
s.version = Pickle::Version::String
|
69
|
-
s.summary = "Easy model creation and reference in your cucumber features"
|
70
|
-
s.description = "Easy model creation and reference in your cucumber features"
|
71
|
-
s.email = "ian.w.white@gmail.com"
|
72
|
-
s.homepage = "http://github.com/ianwhite/pickle/tree"
|
73
|
-
s.authors = ["Ian White"]
|
74
|
-
end
|
75
|
-
|
76
|
-
Jeweler::GemcutterTasks.new
|
77
|
-
|
78
|
-
namespace :release do
|
79
|
-
task :all => ['release', 'gemcutter:release']
|
80
|
-
end
|
81
|
-
|
82
|
-
rescue LoadError
|
83
|
-
puts "Jeweler not available for gem tasks. Install it with: sudo gem install jeweler"
|
84
|
-
end
|
85
|
-
|
86
|
-
begin
|
87
|
-
require 'yard'
|
88
|
-
|
89
|
-
YARD::Rake::YardocTask.new(:doc) do |t|
|
90
|
-
t.files = ['lib/**/*.rb', 'generators/**/*.rb']
|
91
|
-
end
|
92
|
-
|
93
|
-
rescue LoadError
|
94
|
-
puts "YARD not available for doc tasks. Install it with: sudo gem install yard"
|
95
|
-
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'cucumber/rake/task'
|
2
|
+
|
3
|
+
desc "Run features"
|
4
|
+
Cucumber::Rake::Task.new(:cucumber => [:cucumber_test_app]) do |t|
|
5
|
+
t.cucumber_opts = ['--format', 'pretty', '--require', 'features']
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "setup a rails app for running cucumber"
|
9
|
+
file "cucumber_test_app" do
|
10
|
+
puts "** setting up cucumber test app ** (rails 2.3 only at present)"
|
11
|
+
Rake::Task['cucumber:setup'].invoke
|
12
|
+
end
|
13
|
+
|
14
|
+
namespace :cucumber do
|
15
|
+
task :setup do
|
16
|
+
rm_rf "cucumber_test_app"
|
17
|
+
sh "rails cucumber_test_app"
|
18
|
+
cd "cucumber_test_app" do
|
19
|
+
sh "script/generate rspec"
|
20
|
+
sh "script/generate cucumber"
|
21
|
+
end
|
22
|
+
sh "ln -s #{File.expand_path('.')} cucumber_test_app/vendor/plugins/pickle"
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'jeweler'
|
2
|
+
require 'pickle/version'
|
3
|
+
|
4
|
+
Jeweler::Tasks.new do |s|
|
5
|
+
s.name = "pickle"
|
6
|
+
s.version = Pickle::Version::String
|
7
|
+
s.summary = "Easy model creation and reference in your cucumber features"
|
8
|
+
s.description = "Easy model creation and reference in your cucumber features"
|
9
|
+
s.email = "ian.w.white@gmail.com"
|
10
|
+
s.homepage = "http://github.com/ianwhite/pickle/tree"
|
11
|
+
s.authors = ["Ian White"]
|
12
|
+
end
|
13
|
+
|
14
|
+
Jeweler::GemcutterTasks.new
|
15
|
+
|
16
|
+
namespace :release do
|
17
|
+
desc "release to github and gemcutter"
|
18
|
+
task :all => ['release', 'gemcutter:release']
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec/rake/spectask'
|
2
|
+
require 'spec/rake/verify_rcov'
|
3
|
+
|
4
|
+
desc "Generate RCov report"
|
5
|
+
Spec::Rake::SpecTask.new(:rcov) do |t|
|
6
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
7
|
+
t.rcov = true
|
8
|
+
t.rcov_dir = 'doc/coverage'
|
9
|
+
t.rcov_opts = ['--text-report', '--exclude', "gems/,features/,/Library,spec/,rcov.rb"]
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace :rcov do
|
13
|
+
desc "Verify RCov threshold"
|
14
|
+
RCov::VerifyTask.new(:verify => :rcov) do |t|
|
15
|
+
t.threshold = 98.12
|
16
|
+
t.index_html = 'doc/coverage/index.html'
|
17
|
+
end
|
18
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.10
|
data/lib/pickle/adapter.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/core_ext'
|
2
|
+
|
1
3
|
module Pickle
|
2
4
|
# Abstract Factory adapter class, if you have a factory type setup, you
|
3
5
|
# can easily create an adaptor to make it work with Pickle.
|
@@ -15,7 +17,12 @@ module Pickle
|
|
15
17
|
raise NotImplementedError, "create and return an object with the given attributes"
|
16
18
|
end
|
17
19
|
|
18
|
-
|
20
|
+
if respond_to?(:class_attribute)
|
21
|
+
class_attribute :model_classes
|
22
|
+
else
|
23
|
+
cattr_writer :model_classes
|
24
|
+
end
|
25
|
+
|
19
26
|
self.model_classes = nil
|
20
27
|
|
21
28
|
class << self
|
data/lib/pickle/version.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
module Pickle
|
2
2
|
module Version
|
3
|
-
String = File.read(File.dirname(
|
4
|
-
|
3
|
+
String = File.read(File.dirname(__FILE__) + '/../../VERSION').strip
|
4
|
+
Array = String.split('.').map{|i| i.to_i}
|
5
|
+
Major = Array[0]
|
6
|
+
Minor = Array[1]
|
7
|
+
Patch = Array[2]
|
5
8
|
end
|
6
9
|
end
|
data/pickle.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pickle}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ian White"]
|
@@ -21,6 +21,11 @@ Gem::Specification.new do |s|
|
|
21
21
|
"License.txt",
|
22
22
|
"README.rdoc",
|
23
23
|
"Rakefile",
|
24
|
+
"Rakefile.d/cucumber.rake",
|
25
|
+
"Rakefile.d/jeweller.rake",
|
26
|
+
"Rakefile.d/rcov.rake",
|
27
|
+
"Rakefile.d/rspec.rake",
|
28
|
+
"Rakefile.d/yard.rake",
|
24
29
|
"Todo.txt",
|
25
30
|
"VERSION",
|
26
31
|
"features/app/app.rb",
|
data/spec/pickle/adapter_spec.rb
CHANGED
data/spec/pickle/email_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 10
|
9
|
+
version: 0.2.10
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ian White
|
@@ -32,6 +32,11 @@ files:
|
|
32
32
|
- License.txt
|
33
33
|
- README.rdoc
|
34
34
|
- Rakefile
|
35
|
+
- Rakefile.d/cucumber.rake
|
36
|
+
- Rakefile.d/jeweller.rake
|
37
|
+
- Rakefile.d/rcov.rake
|
38
|
+
- Rakefile.d/rspec.rake
|
39
|
+
- Rakefile.d/yard.rake
|
35
40
|
- Todo.txt
|
36
41
|
- VERSION
|
37
42
|
- features/app/app.rb
|