middlemac-extras 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c85e311f64a6b602ca9b5c9f9c04aefd33dbd19f
4
- data.tar.gz: c9fa9f990646fb0cd4556d0b00853581f56e8ccc
3
+ metadata.gz: 495994db42495680f0b1120222ed61daa388c862
4
+ data.tar.gz: 1b2a542810f637be1ddcad663a6294b2845c5c4a
5
5
  SHA512:
6
- metadata.gz: 5499e4cc80d1d6e9f7d52535d42910a3de2ea2c98321e9568cdb097f6610ffa673328146e9d141755cae62e1e765d9684261e8fab22f6c7ee3d4f9285514585e
7
- data.tar.gz: 4febfd9e6312beb93cfe60118b03bd9995fab19266e0bed3cd05fc96a7e4dea28b0b0c43b83ffbc984a0a1b64f34118728cc2e542838b8005cd847533e70d8d6
6
+ metadata.gz: 7772bd7134d91de59d3aac5c3fb17dbeda7e9e6e1fe55207b05c174521120fc490d0c7c5d39230060e7b4dbb4dccfdb6e77ae944b110c82872d8c8bfcc292ac9
7
+ data.tar.gz: cb51007b3c6706795746ccc35864c3ad18dbb5674a4cbe164d22e7d61f3ceabc740b6d8278b1343aff06a2c432fce6f037dd9c3ce31a8a6dbfd1774cc26f25c4
data/CHANGELOG.md CHANGED
@@ -1,13 +1,19 @@
1
1
  middlemac-extras change log
2
2
  ===========================
3
3
 
4
- - Version 1.0.7 / 2016-May-11
4
+ - Version 1.0.8 / 2016-May-15
5
5
 
6
+ - Bump to 1.0.8 improvements:
7
+ - Better version management in Rakefile.
8
+ - Fixes failing Cucumber testing by forcing capybara development dependency.
6
9
  - Version 1.0.7 supports RAKE, Yard, etc.
7
10
  - YARD support added.
8
11
  - Cucumber tests added.
9
12
  - Documentation project updates.
10
13
  - Source code commented extensively for YARD.
14
+
15
+ - Version 1.0.6 / 2016-April-08
16
+
11
17
  - Works cooperative if middleman-targets is installed to support images without extensions for target-specific images, too. Added CLI help section.
12
18
 
13
19
  - Version 1.0.5 / 2016-April-08
data/Rakefile CHANGED
@@ -86,11 +86,7 @@ desc 'Remove any wip suffix from the version'
86
86
  task :version_finalize do
87
87
  version_old = Middleman::MiddlemacExtras::VERSION
88
88
  version_new = version_old.sub('.wip', '')
89
- update_version_file( version_new )
90
- update_doc_file( version_new )
91
- update_doc_gemfile( version_new )
92
- Middleman::MiddlemacExtras.send(:remove_const, 'VERSION')
93
- Middleman::MiddlemacExtras::VERSION = version_new
89
+ update_versions( version_new )
94
90
  end
95
91
 
96
92
 
@@ -104,11 +100,17 @@ task :version_next_wip do
104
100
  version_new = version_old.sub('.wip', '').split('.')
105
101
  version_new.last.succ!
106
102
  version_new = version_new.join('.') + '.wip'
107
- update_version_file( version_new )
108
- update_doc_file( version_new )
109
- update_doc_gemfile( version_new )
110
- Middleman::MiddlemacExtras.send(:remove_const, 'VERSION')
111
- Middleman::MiddlemacExtras::VERSION = version_new
103
+ update_versions( version_new )
104
+ end
105
+
106
+
107
+ ###############################################################################
108
+ # :version_set
109
+ # Sets an arbitrary version.
110
+ ###############################################################################
111
+ desc 'Sets all of the files to the version specified. Use rake version_set[value].'
112
+ task :version_set, :new_version do |t, args|
113
+ update_versions( args[:new_version] )
112
114
  end
113
115
 
114
116
 
@@ -175,38 +177,29 @@ private
175
177
 
176
178
 
177
179
  ###############################################################################
178
- # update_version_file
179
- # Replace the version in the `version.rb` file.
180
- ###############################################################################
181
- def update_version_file( version_new )
182
- file = File.expand_path('../lib/middlemac-extras/version.rb', __FILE__)
183
- content = File.read(file)
184
- content.sub!(/(?<=VERSION = ')(.*)(?=')/, version_new)
185
- File.write(file, content)
186
- puts "version.rb changed to #{version_new}."
187
- end
188
-
189
- ###############################################################################
190
- # update_doc_file
191
- # Replace the version in the `documentation_project/config.rb` file.
192
- ###############################################################################
193
- def update_doc_file( version_new )
194
- file = File.expand_path('../documentation_project/config.rb', __FILE__)
195
- content = File.read(file)
196
- content.sub!(/(?<=def product_version).*?(?=end)/m, "\n '#{version_new}'\n")
197
- File.write(file, content)
198
- puts "config.rb changed to #{version_new}."
199
- end
180
+ # update_versions
181
+ # Update the version in various files that depend on the correct version.
182
+ ###############################################################################
183
+ def update_versions( version_new )
184
+ [ {
185
+ :file => File.expand_path('../lib/middlemac-extras/version.rb', __FILE__),
186
+ :regex => /(?<=VERSION = ')(.*)(?=')/
187
+ },
188
+ {
189
+ :file => File.expand_path('../documentation_project/Gemfile', __FILE__),
190
+ :regex => /(?<=gem 'middlemac-extras', '~> ).*(?=')/
191
+ },
192
+ {
193
+ :file => File.expand_path('../documentation_project/config.rb', __FILE__),
194
+ :regex => /(?<=def product_version\n ').*?(?='\n end)/m
195
+ },
196
+ ].each do | item |
197
+
198
+ content = File.read( item[:file] )
199
+ content.gsub!( item[:regex], version_new )
200
+ File.write( item[:file], content )
201
+ puts "#{File.basename( item[:file] )} changed to '#{version_new}'."
202
+ end
200
203
 
201
- ###############################################################################
202
- # update_doc_gemfile
203
- # Replace the version in the `documentation_project/Gemfile` file.
204
- ###############################################################################
205
- def update_doc_gemfile( version_new )
206
- file = File.expand_path('../documentation_project/Gemfile', __FILE__)
207
- content = File.read(file)
208
- # gem 'middlemac-extras', '~> 1.0.7.wip'
209
- content.sub!(/(?<=gem 'middlemac-extras', '~> ).*(?=')/, version_new)
210
- File.write(file, content)
211
- puts "Gemfile changed to #{version_new}."
204
+ Middleman::MiddlemacExtras::VERSION.replace version_new
212
205
  end
@@ -9,7 +9,7 @@ gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
9
9
  gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
10
10
 
11
11
  # Middleman Gems
12
- gem 'middlemac-extras', '~> 1.0.7'
12
+ gem 'middlemac-extras', '~> 1.0.8'
13
13
  gem 'middleman', '~> 4.1.7'
14
14
  gem 'middleman-syntax'
15
15
 
@@ -58,11 +58,7 @@ helpers do
58
58
  end
59
59
 
60
60
  def product_version
61
- '1.0.7'
62
- end
63
-
64
- def product_uri
65
- 'https://github.com/middlemac'
61
+ '1.0.8'
66
62
  end
67
63
 
68
64
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module MiddlemacExtras
3
- VERSION = '1.0.7'
3
+ VERSION = '1.0.8'
4
4
  end
5
5
  end
@@ -32,4 +32,5 @@ Gem::Specification.new do |s|
32
32
  s.add_development_dependency 'bundler', '>= 1.6'
33
33
  s.add_development_dependency 'rake', '>= 10.3'
34
34
  s.add_development_dependency 'git'
35
+ s.add_development_dependency 'capybara', ['~> 2.5.0']
35
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middlemac-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Derry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -126,6 +126,20 @@ dependencies:
126
126
  - - ">="
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: capybara
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: 2.5.0
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: 2.5.0
129
143
  description: Implements several useful developer conveniences for Middleman projects.
130
144
  email:
131
145
  - balthisar@gmail.com