postini 0.2.0pre → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWI0YTQ1ZjdmNGY3ZmRiZGZlZjQ1ODgwZTY2YjMwZDZjZGViNGYxMA==
5
+ data.tar.gz: !binary |-
6
+ NTNhYzc3NzBkNjUzNmZkMDBmNjUxYTk2MmU2ZGY4MDY2ODg1NzdiNQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NmFiMWUwYTBlNDhjYTUwZDRjNGIyMTVmMzRiZGZiN2ZjNDIyZDI0M2ViNTA0
10
+ NWRiM2MyNDlhMWFhYzIzNTNmZjcxZTliZjk1NjAxNDQwOGFiNGY3YTAxOTcw
11
+ M2Y2NTJhNDg2OWFkYWQ3MzhiY2FiNGYzMTRkMDIwZTAzMWIzOTk=
12
+ data.tar.gz: !binary |-
13
+ ZmJjMzIxODhmZjg2MDI5OTBlNmQ3N2YzMTI1NTdlMWQ1ZjhhODRkNjQ3ODc5
14
+ OTdkM2JmNDg0YzEzNDRkMWMyYTg1YTQ2YmM1ODY5MzU0NTFlZmFhYTVhYjhm
15
+ ZTc2NTEwMzg1MTY2YWY4MzUwZDNkMGMxMjM4YTU1MGQ4MjIwMTg=
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -0,0 +1 @@
1
+ 1.9.3-p484
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'handsoap'
4
+ gem 'curb'
5
+ gem 'nokogiri'
6
+
7
+ group :development, :test do
8
+ gem 'rspec', '~> 2.14.0'
9
+ gem 'bundler', '~> 1.5.0'
10
+ gem 'jeweler', '~> 1.6.1'
11
+ end
@@ -0,0 +1,34 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ curb (0.8.5)
5
+ diff-lcs (1.2.5)
6
+ git (1.2.6)
7
+ handsoap (1.4.0)
8
+ jeweler (1.6.4)
9
+ bundler (~> 1.0)
10
+ git (>= 1.2.5)
11
+ rake
12
+ mini_portile (0.5.2)
13
+ nokogiri (1.6.1)
14
+ mini_portile (~> 0.5.0)
15
+ rake (10.1.1)
16
+ rspec (2.14.1)
17
+ rspec-core (~> 2.14.0)
18
+ rspec-expectations (~> 2.14.0)
19
+ rspec-mocks (~> 2.14.0)
20
+ rspec-core (2.14.7)
21
+ rspec-expectations (2.14.5)
22
+ diff-lcs (>= 1.1.3, < 2.0)
23
+ rspec-mocks (2.14.5)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ bundler (~> 1.5.0)
30
+ curb
31
+ handsoap
32
+ jeweler (~> 1.6.1)
33
+ nokogiri
34
+ rspec (~> 2.14.0)
data/Rakefile CHANGED
@@ -14,12 +14,7 @@ begin
14
14
  gemspec.authors = ['kenneth.kalmer@gmail.com']
15
15
  gemspec.post_install_message = IO.read('PostInstall.txt')
16
16
  gemspec.extra_rdoc_files.include '*.txt'
17
-
18
- gemspec.add_dependency 'handsoap'
19
- gemspec.add_dependency 'curb'
20
- gemspec.add_dependency 'nokogiri'
21
- gemspec.add_development_dependency 'rspec'
22
- gemspec.add_development_dependency 'cucumber'
17
+ # dependencies defined in Gemfile
23
18
  end
24
19
  Jeweler::GemcutterTasks.new
25
20
  rescue LoadError
@@ -1,8 +1,4 @@
1
- $:.unshift(File.dirname(__FILE__)) unless
2
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
-
4
1
  # requirements
5
- require 'rubygems'
6
2
  require 'curb'
7
3
  require 'nokogiri'
8
4
  require 'handsoap'
@@ -78,7 +74,7 @@ require 'postini/exceptions'
78
74
  # degrees, and allow you to access some soap4r internals as well.
79
75
  #
80
76
  module Postini
81
- VERSION = "0.2.0pre"
77
+ VERSION = "0.2.0"
82
78
 
83
79
  autoload :ConfigurationCheck, "postini/configuration_check"
84
80
  autoload :Endpoints, "postini/endpoints"
@@ -1,106 +1,92 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: postini 0.2.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = %q{postini}
8
- s.version = "0.2.0pre"
8
+ s.name = "postini"
9
+ s.version = "0.2.0"
9
10
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["kenneth.kalmer@gmail.com"]
12
- s.date = %q{2010-09-27}
13
- s.description = %q{Library to make the Postini SOAP API more palatable}
14
- s.email = %q{kenneth.kalmer@gmail.com}
14
+ s.date = "2014-02-24"
15
+ s.description = "Library to make the Postini SOAP API more palatable"
16
+ s.email = "kenneth.kalmer@gmail.com"
15
17
  s.extra_rdoc_files = [
16
18
  "History.txt",
17
- "License.txt",
18
- "PostInstall.txt",
19
- "README.txt",
20
- "TODO"
19
+ "License.txt",
20
+ "PostInstall.txt",
21
+ "README.txt",
22
+ "TODO"
21
23
  ]
22
24
  s.files = [
23
- ".gitignore",
24
- "History.txt",
25
- "License.txt",
26
- "PostInstall.txt",
27
- "README.txt",
28
- "Rakefile",
29
- "TODO",
30
- "config/website.yml",
31
- "features/development.feature",
32
- "features/step_definitions/common_steps.rb",
33
- "features/support/common.rb",
34
- "features/support/env.rb",
35
- "features/support/matchers.rb",
36
- "lib/postini.rb",
37
- "lib/postini/automated_batch_service.rb",
38
- "lib/postini/configuration_check.rb",
39
- "lib/postini/endpoint_resolver_service.rb",
40
- "lib/postini/endpoints.rb",
41
- "lib/postini/exceptions.rb",
42
- "postini.gemspec",
43
- "script/console",
44
- "script/destroy",
45
- "script/generate",
46
- "script/txt2html",
47
- "spec/exceptions_spec.rb",
48
- "spec/postini_spec.rb",
49
- "spec/rcov.opts",
50
- "spec/spec.opts",
51
- "spec/spec_helper.rb",
52
- "tasks/rspec.rake",
53
- "vendor/automatedbatch.wsdl",
54
- "vendor/endpointresolver.wsdl",
55
- "website/index.txt",
56
- "website/javascripts/rounded_corners_lite.inc.js",
57
- "website/spam_box.png",
58
- "website/stylesheets/screen.css",
59
- "website/template.html.erb"
60
- ]
61
- s.homepage = %q{http://postini4r.rubyforge.org}
62
- s.post_install_message = %q{
63
- For more information on postini4r's postini gem, see
64
- http://postini4r.rubyforge.org/postini
65
-
66
- Remember to contact your Postini provider, or Postini directly, to gain access
67
- to the Postini Early Access Program. You'll need a unique API key to make use
68
- of this gem.
69
-
70
- }
71
- s.rdoc_options = ["--charset=UTF-8"]
72
- s.require_paths = ["lib"]
73
- s.rubygems_version = %q{1.3.7}
74
- s.summary = %q{Library to make the Postini SOAP API more palatable}
75
- s.test_files = [
25
+ ".rspec",
26
+ ".ruby-version",
27
+ "Gemfile",
28
+ "Gemfile.lock",
29
+ "History.txt",
30
+ "License.txt",
31
+ "PostInstall.txt",
32
+ "README.txt",
33
+ "Rakefile",
34
+ "TODO",
35
+ "config/website.yml",
36
+ "lib/postini.rb",
37
+ "lib/postini/automated_batch_service.rb",
38
+ "lib/postini/configuration_check.rb",
39
+ "lib/postini/endpoint_resolver_service.rb",
40
+ "lib/postini/endpoints.rb",
41
+ "lib/postini/exceptions.rb",
42
+ "postini.gemspec",
43
+ "script/console",
44
+ "script/destroy",
45
+ "script/generate",
46
+ "script/txt2html",
76
47
  "spec/exceptions_spec.rb",
77
- "spec/postini_spec.rb",
78
- "spec/spec_helper.rb"
48
+ "spec/postini_spec.rb",
49
+ "spec/rcov.opts",
50
+ "spec/spec_helper.rb",
51
+ "tasks/rspec.rake",
52
+ "vendor/automatedbatch.wsdl",
53
+ "vendor/endpointresolver.wsdl",
54
+ "website/index.txt",
55
+ "website/javascripts/rounded_corners_lite.inc.js",
56
+ "website/spam_box.png",
57
+ "website/stylesheets/screen.css",
58
+ "website/template.html.erb"
79
59
  ]
60
+ s.homepage = "http://postini4r.rubyforge.org"
61
+ s.post_install_message = "\nFor more information on postini4r's postini gem, see \nhttp://postini4r.rubyforge.org/postini\n\nRemember to contact your Postini provider, or Postini directly, to gain access\nto the Postini Early Access Program. You'll need a unique API key to make use\nof this gem.\n\n"
62
+ s.rubygems_version = "2.2.2"
63
+ s.summary = "Library to make the Postini SOAP API more palatable"
80
64
 
81
65
  if s.respond_to? :specification_version then
82
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
83
- s.specification_version = 3
66
+ s.specification_version = 4
84
67
 
85
68
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
86
69
  s.add_runtime_dependency(%q<handsoap>, [">= 0"])
87
70
  s.add_runtime_dependency(%q<curb>, [">= 0"])
88
71
  s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
89
- s.add_development_dependency(%q<rspec>, [">= 0"])
90
- s.add_development_dependency(%q<cucumber>, [">= 0"])
72
+ s.add_development_dependency(%q<rspec>, ["~> 2.14.0"])
73
+ s.add_development_dependency(%q<bundler>, ["~> 1.5.0"])
74
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.1"])
91
75
  else
92
76
  s.add_dependency(%q<handsoap>, [">= 0"])
93
77
  s.add_dependency(%q<curb>, [">= 0"])
94
78
  s.add_dependency(%q<nokogiri>, [">= 0"])
95
- s.add_dependency(%q<rspec>, [">= 0"])
96
- s.add_dependency(%q<cucumber>, [">= 0"])
79
+ s.add_dependency(%q<rspec>, ["~> 2.14.0"])
80
+ s.add_dependency(%q<bundler>, ["~> 1.5.0"])
81
+ s.add_dependency(%q<jeweler>, ["~> 1.6.1"])
97
82
  end
98
83
  else
99
84
  s.add_dependency(%q<handsoap>, [">= 0"])
100
85
  s.add_dependency(%q<curb>, [">= 0"])
101
86
  s.add_dependency(%q<nokogiri>, [">= 0"])
102
- s.add_dependency(%q<rspec>, [">= 0"])
103
- s.add_dependency(%q<cucumber>, [">= 0"])
87
+ s.add_dependency(%q<rspec>, ["~> 2.14.0"])
88
+ s.add_dependency(%q<bundler>, ["~> 1.5.0"])
89
+ s.add_dependency(%q<jeweler>, ["~> 1.6.1"])
104
90
  end
105
91
  end
106
92
 
@@ -1,15 +1,14 @@
1
- begin
2
- require 'spec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- gem 'rspec'
6
- require 'spec'
7
- end
8
-
9
- $:.unshift(File.dirname(__FILE__) + '/../lib')
1
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
10
2
  require 'postini'
11
3
  require 'ostruct'
4
+ RSpec.configure do |config|
5
+ config.treat_symbols_as_metadata_keys_with_true_values = true
6
+ config.run_all_when_everything_filtered = true
7
+ config.filter_run :focus
12
8
 
13
- Spec::Runner.configure do |config|
14
- config.mock_with :mocha
9
+ # Run specs in random order to surface order dependencies. If you find an
10
+ # order dependency and want to debug it, you can fix the order by providing
11
+ # the seed, which is printed after each run.
12
+ # --seed 1234
13
+ config.order = 'random'
15
14
  end
@@ -1,21 +1,6 @@
1
- begin
2
- require 'spec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- require 'spec'
6
- end
7
- begin
8
- require 'spec/rake/spectask'
9
- rescue LoadError
10
- puts <<-EOS
11
- To use rspec for testing you must install rspec gem:
12
- gem install rspec
13
- EOS
14
- exit(0)
15
- end
1
+ require 'rspec/core/rake_task'
16
2
 
17
3
  desc "Run the specs under spec/models"
18
- Spec::Rake::SpecTask.new do |t|
19
- t.spec_opts = ['--options', "spec/spec.opts"]
20
- t.spec_files = FileList['spec/**/*_spec.rb']
4
+ RSpec::Core::RakeTask.new do |t|
5
+ t.rspec_opts = "--colour"
21
6
  end
metadata CHANGED
@@ -1,107 +1,114 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: postini
3
- version: !ruby/object:Gem::Version
4
- hash: -261682962
5
- prerelease: true
6
- segments:
7
- - 0
8
- - 2
9
- - 0pre
10
- version: 0.2.0pre
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - kenneth.kalmer@gmail.com
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2010-09-27 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2014-02-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: handsoap
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
33
20
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: curb
37
21
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: curb
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
47
34
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: nokogiri
51
35
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
61
48
  type: :runtime
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
64
56
  name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.14.0
62
+ type: :development
65
63
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 2.14.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 1.5.0
75
76
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: cucumber
79
77
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 1.5.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: jeweler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 1.6.1
89
90
  type: :development
90
- version_requirements: *id005
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 1.6.1
91
97
  description: Library to make the Postini SOAP API more palatable
92
98
  email: kenneth.kalmer@gmail.com
93
99
  executables: []
94
-
95
100
  extensions: []
96
-
97
- extra_rdoc_files:
101
+ extra_rdoc_files:
98
102
  - History.txt
99
103
  - License.txt
100
104
  - PostInstall.txt
101
105
  - README.txt
102
106
  - TODO
103
- files:
104
- - .gitignore
107
+ files:
108
+ - .rspec
109
+ - .ruby-version
110
+ - Gemfile
111
+ - Gemfile.lock
105
112
  - History.txt
106
113
  - License.txt
107
114
  - PostInstall.txt
@@ -109,11 +116,6 @@ files:
109
116
  - Rakefile
110
117
  - TODO
111
118
  - config/website.yml
112
- - features/development.feature
113
- - features/step_definitions/common_steps.rb
114
- - features/support/common.rb
115
- - features/support/env.rb
116
- - features/support/matchers.rb
117
119
  - lib/postini.rb
118
120
  - lib/postini/automated_batch_service.rb
119
121
  - lib/postini/configuration_check.rb
@@ -128,7 +130,6 @@ files:
128
130
  - spec/exceptions_spec.rb
129
131
  - spec/postini_spec.rb
130
132
  - spec/rcov.opts
131
- - spec/spec.opts
132
133
  - spec/spec_helper.rb
133
134
  - tasks/rspec.rake
134
135
  - vendor/automatedbatch.wsdl
@@ -138,51 +139,30 @@ files:
138
139
  - website/spam_box.png
139
140
  - website/stylesheets/screen.css
140
141
  - website/template.html.erb
141
- has_rdoc: true
142
142
  homepage: http://postini4r.rubyforge.org
143
143
  licenses: []
144
-
145
- post_install_message: |+
146
-
147
- For more information on postini4r's postini gem, see
148
- http://postini4r.rubyforge.org/postini
149
-
150
- Remember to contact your Postini provider, or Postini directly, to gain access
151
- to the Postini Early Access Program. You'll need a unique API key to make use
152
- of this gem.
153
-
154
- rdoc_options:
155
- - --charset=UTF-8
156
- require_paths:
144
+ metadata: {}
145
+ post_install_message: ! "\nFor more information on postini4r's postini gem, see \nhttp://postini4r.rubyforge.org/postini\n\nRemember
146
+ to contact your Postini provider, or Postini directly, to gain access\nto the Postini
147
+ Early Access Program. You'll need a unique API key to make use\nof this gem.\n\n"
148
+ rdoc_options: []
149
+ require_paths:
157
150
  - lib
158
- required_ruby_version: !ruby/object:Gem::Requirement
159
- none: false
160
- requirements:
161
- - - ">="
162
- - !ruby/object:Gem::Version
163
- hash: 3
164
- segments:
165
- - 0
166
- version: "0"
167
- required_rubygems_version: !ruby/object:Gem::Requirement
168
- none: false
169
- requirements:
170
- - - ">"
171
- - !ruby/object:Gem::Version
172
- hash: 25
173
- segments:
174
- - 1
175
- - 3
176
- - 1
177
- version: 1.3.1
151
+ required_ruby_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
178
161
  requirements: []
179
-
180
162
  rubyforge_project:
181
- rubygems_version: 1.3.7
163
+ rubygems_version: 2.2.2
182
164
  signing_key:
183
- specification_version: 3
165
+ specification_version: 4
184
166
  summary: Library to make the Postini SOAP API more palatable
185
- test_files:
186
- - spec/exceptions_spec.rb
187
- - spec/postini_spec.rb
188
- - spec/spec_helper.rb
167
+ test_files: []
168
+ has_rdoc:
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- nbproject
2
- pkg
3
- doc
4
- vendor/troelskn-handsoap-*
5
- *.swp
6
- .yardoc
7
- pkg
@@ -1,13 +0,0 @@
1
- Feature: Development processes of newgem itself (rake tasks)
2
-
3
- As a Newgem maintainer or contributor
4
- I want rake tasks to maintain and release the gem
5
- So that I can spend time on the tests and code, and not excessive time on maintenance processes
6
-
7
- Scenario: Generate RubyGem
8
- Given this project is active project folder
9
- And "pkg" folder is deleted
10
- When I invoke task "rake gem"
11
- Then folder "pkg" is created
12
- And file with name matching "pkg/*.gem" is created else you should run "rake manifest" to fix this
13
- And gem spec key "rdoc_options" contains /--mainREADME.rdoc/
@@ -1,172 +0,0 @@
1
- Given /^a safe folder/ do
2
- FileUtils.rm_rf @tmp_root = File.dirname(__FILE__) + "/../../tmp"
3
- FileUtils.mkdir_p @tmp_root
4
- FileUtils.mkdir_p @home_path = File.expand_path(File.join(@tmp_root, "home"))
5
- @lib_path = File.expand_path(File.dirname(__FILE__) + '/../../lib')
6
- Given %Q{env variable $HOME set to "#{@home_path}"}
7
- end
8
-
9
- Given /^this project is active project folder/ do
10
- Given "a safe folder"
11
- @active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..")
12
- end
13
-
14
- Given /^env variable \$([\w_]+) set to "(.*)"/ do |env_var, value|
15
- ENV[env_var] = value
16
- end
17
-
18
- Given /"(.*)" folder is deleted/ do |folder|
19
- in_project_folder { FileUtils.rm_rf folder }
20
- end
21
-
22
- When /^I invoke "(.*)" generator with arguments "(.*)"$/ do |generator, arguments|
23
- @stdout = StringIO.new
24
- in_project_folder do
25
- if Object.const_defined?("APP_ROOT")
26
- APP_ROOT.replace(FileUtils.pwd)
27
- else
28
- APP_ROOT = FileUtils.pwd
29
- end
30
- run_generator(generator, arguments.split(' '), SOURCES, :stdout => @stdout)
31
- end
32
- File.open(File.join(@tmp_root, "generator.out"), "w") do |f|
33
- @stdout.rewind
34
- f << @stdout.read
35
- end
36
- end
37
-
38
- When /^I run executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
39
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
40
- in_project_folder do
41
- system "#{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
42
- end
43
- end
44
-
45
- When /^I run project executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
46
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
47
- in_project_folder do
48
- system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
49
- end
50
- end
51
-
52
- When /^I run local executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
53
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
54
- executable = File.expand_path(File.join(File.dirname(__FILE__), "/../../bin", executable))
55
- in_project_folder do
56
- system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
57
- end
58
- end
59
-
60
- When /^I invoke task "rake (.*)"/ do |task|
61
- @stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
62
- in_project_folder do
63
- system "rake #{task} --trace > #{@stdout} 2> #{@stdout}"
64
- end
65
- end
66
-
67
- Then /^folder "(.*)" (is|is not) created/ do |folder, is|
68
- in_project_folder do
69
- File.exists?(folder).should(is == 'is' ? be_true : be_false)
70
- end
71
- end
72
-
73
- Then /^file "(.*)" (is|is not) created/ do |file, is|
74
- in_project_folder do
75
- File.exists?(file).should(is == 'is' ? be_true : be_false)
76
- end
77
- end
78
-
79
- Then /^file with name matching "(.*)" is created/ do |pattern|
80
- in_project_folder do
81
- Dir[pattern].should_not be_empty
82
- end
83
- end
84
-
85
- Then /^file "(.*)" contents (does|does not) match \/(.*)\// do |file, does, regex|
86
- in_project_folder do
87
- actual_output = File.read(file)
88
- (does == 'does') ?
89
- actual_output.should(match(/#{regex}/)) :
90
- actual_output.should_not(match(/#{regex}/))
91
- end
92
- end
93
-
94
- Then /gem file "(.*)" and generated file "(.*)" should be the same/ do |gem_file, project_file|
95
- File.exists?(gem_file).should be_true
96
- File.exists?(project_file).should be_true
97
- gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
98
- project_file_contents = File.read(File.join(@active_project_folder, project_file))
99
- project_file_contents.should == gem_file_contents
100
- end
101
-
102
- Then /^(does|does not) invoke generator "(.*)"$/ do |does_invoke, generator|
103
- actual_output = File.read(@stdout)
104
- does_invoke == "does" ?
105
- actual_output.should(match(/dependency\s+#{generator}/)) :
106
- actual_output.should_not(match(/dependency\s+#{generator}/))
107
- end
108
-
109
- Then /help options "(.*)" and "(.*)" are displayed/ do |opt1, opt2|
110
- actual_output = File.read(@stdout)
111
- actual_output.should match(/#{opt1}/)
112
- actual_output.should match(/#{opt2}/)
113
- end
114
-
115
- Then /^I should see$/ do |text|
116
- actual_output = File.read(@stdout)
117
- actual_output.should contain(text)
118
- end
119
-
120
- Then /^I should not see$/ do |text|
121
- actual_output = File.read(@stdout)
122
- actual_output.should_not contain(text)
123
- end
124
-
125
- Then /^I should see exactly$/ do |text|
126
- actual_output = File.read(@stdout)
127
- actual_output.should == text
128
- end
129
-
130
- Then /^I should see all (\d+) tests pass/ do |expected_test_count|
131
- expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
132
- actual_output = File.read(@stdout)
133
- actual_output.should match(expected)
134
- end
135
-
136
- Then /^I should see all (\d+) examples pass/ do |expected_test_count|
137
- expected = %r{^#{expected_test_count} examples?, 0 failures}
138
- actual_output = File.read(@stdout)
139
- actual_output.should match(expected)
140
- end
141
-
142
- Then /^yaml file "(.*)" contains (\{.*\})/ do |file, yaml|
143
- in_project_folder do
144
- yaml = eval yaml
145
- YAML.load(File.read(file)).should == yaml
146
- end
147
- end
148
-
149
- Then /^Rakefile can display tasks successfully/ do
150
- @stdout = File.expand_path(File.join(@tmp_root, "rakefile.out"))
151
- in_project_folder do
152
- system "rake -T > #{@stdout} 2> #{@stdout}"
153
- end
154
- actual_output = File.read(@stdout)
155
- actual_output.should match(/^rake\s+\w+\s+#\s.*/)
156
- end
157
-
158
- Then /^task "rake (.*)" is executed successfully/ do |task|
159
- @stdout.should_not be_nil
160
- actual_output = File.read(@stdout)
161
- actual_output.should_not match(/^Don't know how to build task '#{task}'/)
162
- actual_output.should_not match(/Error/i)
163
- end
164
-
165
- Then /^gem spec key "(.*)" contains \/(.*)\// do |key, regex|
166
- in_project_folder do
167
- gem_file = Dir["pkg/*.gem"].first
168
- gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
169
- spec_value = gem_spec.send(key.to_sym)
170
- spec_value.to_s.should match(/#{regex}/)
171
- end
172
- end
@@ -1,29 +0,0 @@
1
- module CommonHelpers
2
- def in_tmp_folder(&block)
3
- FileUtils.chdir(@tmp_root, &block)
4
- end
5
-
6
- def in_project_folder(&block)
7
- project_folder = @active_project_folder || @tmp_root
8
- FileUtils.chdir(project_folder, &block)
9
- end
10
-
11
- def in_home_folder(&block)
12
- FileUtils.chdir(@home_path, &block)
13
- end
14
-
15
- def force_local_lib_override(project_name = @project_name)
16
- rakefile = File.read(File.join(project_name, 'Rakefile'))
17
- File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
18
- f << "$:.unshift('#{@lib_path}')\n"
19
- f << rakefile
20
- end
21
- end
22
-
23
- def setup_active_project_folder project_name
24
- @active_project_folder = File.join(@tmp_root, project_name)
25
- @project_name = project_name
26
- end
27
- end
28
-
29
- World(CommonHelpers)
@@ -1,6 +0,0 @@
1
- require File.dirname(__FILE__) + "/../../lib/postini4r"
2
-
3
- gem 'cucumber'
4
- require 'cucumber'
5
- gem 'rspec'
6
- require 'spec'
@@ -1,11 +0,0 @@
1
- module Matchers
2
- def contain(expected)
3
- simple_matcher("contain #{expected.inspect}") do |given, matcher|
4
- matcher.failure_message = "expected #{given.inspect} to contain #{expected.inspect}"
5
- matcher.negative_failure_message = "expected #{given.inspect} not to contain #{expected.inspect}"
6
- given.index expected
7
- end
8
- end
9
- end
10
-
11
- World(Matchers)
@@ -1 +0,0 @@
1
- --colour