middleman-presentation-core 0.16.0.rc2 → 0.16.0

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: 14a3718f05a00778bb5d3ebe177e1dcda20866dd
4
- data.tar.gz: 1f762a184912a42c9a6165b88c186261b060fd28
3
+ metadata.gz: b20816a0dd2d3570e4037b77dec81ac214288a67
4
+ data.tar.gz: e23d96468db3da230243588e320555a985e22af4
5
5
  SHA512:
6
- metadata.gz: d18bbfa635167eebc1509b02cca4c28d86442ca139862a8b8fac826e0da6fe518bd4a465a7a62c045b501866a9b07c0fc60ddce832c09fa1b3e906cc7d724530
7
- data.tar.gz: b4cbce628a5c964e98f7f02614bcbf2be28f0926acf4d3f337efda5a4eb51057500004019da076be87f9440385b278d1faf7ced418b05a38253004a87d4e6e98
6
+ metadata.gz: d3f73b4dd9bb650a0c7f2efc5018a2b96eb5a8dd384eab61ca0fa042ea591cfa5e51fff10365279f1053b77427c011d761e4a23be548d1f438b3d6bdc469e13b
7
+ data.tar.gz: ffc993b8634ab6e56e8d258e4913a8a9acf1e2e85f89f12d8a58e7cfccdae762b8ba9459a6106c9a91a87bb93a39e35147880f980eaf6341f4bed77ae1a5c452
data/Rakefile CHANGED
@@ -1,104 +1,12 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
3
  require 'filegen'
4
- require 'fedux_org_stdlib/rake_tasks/project'
5
4
  require 'fedux_org_stdlib/rake_tasks/webserver'
6
5
  require 'fedux_org_stdlib/rake_tasks/gems'
6
+ require 'fedux_org_stdlib/rake_tasks/software_version/bump'
7
7
  require 'active_support/all'
8
8
  require 'open3'
9
9
 
10
- def software
11
- gemspec.name.sub(/mp-/, 'middleman-presentation-')
12
- end
13
-
14
- def module_name
15
- software.sub(/-core/, '').gsub(/-/, '/').camelcase
16
- end
17
-
18
- def require_name
19
- software
20
- end
21
-
22
- def gemspec
23
- # rubocop:disable Lint/Eval
24
- eval File.read(Dir.glob(File.join(File.expand_path('../', __FILE__), '*.gemspec')).first)
25
- # rubocop:enable Lint/Eval
26
- end
27
-
28
- def hardware_architecture
29
- `uname -m`.chomp
30
- end
31
-
32
- def archlinux_package_name
33
- File.join(archlinux_build_directory, "#{software}-#{version}-*-#{hardware_architecture}.pkg.tar.xz")
34
- end
35
-
36
- def version
37
- require "#{require_name}/version"
38
- "#{module_name}::VERSION".constantize
39
- end
40
-
41
- def root_directory
42
- ::File.expand_path('../', __FILE__)
43
- end
44
-
45
- def tar_file
46
- ::File.join(pkg_directory, "#{software}-#{version}.tar.gz")
47
- end
48
-
49
- def tmp_directory
50
- ::File.join(root_directory, 'tmp', "#{software}-#{version}")
51
- end
52
-
53
- def archlinux_build_directory
54
- ::File.join(root_directory, 'share', 'archlinux')
55
- end
56
-
57
- def gem_file
58
- ::File.join(root_directory, 'pkg', "#{software}-#{version}.gem")
59
- end
60
-
61
- def pkg_directory
62
- ::File.join(root_directory, 'pkg')
63
- end
64
-
65
- def gem_directory
66
- ::File.join(root_directory, 'vendor', 'cache')
67
- end
68
-
69
- task default: 'package:gem'
70
-
71
- file tmp_directory do
72
- FileUtils.mkdir_p tmp_directory
73
- end
74
-
75
- file archlinux_build_directory do
76
- FileUtils.mkdir_p archlinux_build_directory
77
- end
78
-
79
- def extract_sha
80
- `makepkg -g 2>/dev/null`.split(/\n/).find { |l| l =~ /sha256/ }
81
- end
82
-
83
- namespace :package do
84
- desc 'build gem package'
85
- task :gem do
86
- sh 'RAILS_ENV=production bundle exec rake -f Rakefile.rails assets:clobber'
87
- sh 'RAILS_ENV=production bundle exec rake -f Rakefile.rails assets:precompile'
88
-
89
- base_path = File.expand_path('..', __FILE__)
90
- FileUtils.chmod_R 'a+r', Dir.glob(File.join(base_path, 'public', 'assets', '**', '*')).keep_if { |f| File.file? f }
91
-
92
- Rake::Task['gem:clean'].invoke
93
- Rake::Task['gem:build'].invoke
94
- end
95
-
96
- desc 'build arch linux package'
97
- task :archlinux do
98
- Rake::Task['archlinux:build'].invoke
99
- end
100
- end
101
-
102
10
  require 'coveralls/rake/task'
103
11
  Coveralls::RakeTask.new
104
12
 
@@ -109,8 +17,13 @@ namespace :test do
109
17
  desc 'Test with coveralls'
110
18
  task coveralls: ['test', 'coveralls:push']
111
19
 
112
- require 'rubocop/rake_task'
113
- RuboCop::RakeTask.new
20
+ task :rubocop do
21
+ sh 'bundle exec rubocop'
22
+ end
23
+
24
+ task 'rubocop:autocorrect' do
25
+ sh 'bundle exec rubocop --auto-correct'
26
+ end
114
27
 
115
28
  desc 'Run rspec'
116
29
  task :rspec do
@@ -139,65 +52,4 @@ namespace :gem do
139
52
  end
140
53
  end
141
54
 
142
- namespace :archlinux do
143
- desc 'Install arch linux package'
144
- task :install do
145
- sh "sudo pacman -U #{archlinux_package_name}"
146
- end
147
-
148
- desc 'Prepare package build'
149
- task prepare: ['package:gem', archlinux_build_directory] do
150
- generator = Filegen::Rubygen.new
151
- template = File.read(File.expand_path('../share/archlinux/PKGBUILD.sh.erb', __FILE__))
152
- build_file = File.expand_path('../share/archlinux/PKGBUILD', __FILE__)
153
-
154
- if ENV.key?('LOCAL_BUILD')
155
- package_file = ::File.join(pkg_directory, "#{software}-#{version}.gem")
156
- source = ''
157
- else
158
- # package_file = '$pkgname-$pkgver.gem'
159
- package_file = '$pkgname'
160
- source = 'http://gems.rubyforge.org/gems/$pkgname-$pkgver.gem'
161
- end
162
-
163
- data = {
164
- sha: nil,
165
- version: version,
166
- package: package_file,
167
- source: source
168
- }
169
-
170
- Dir.chdir(archlinux_build_directory) do
171
- File.open(build_file, 'w') do |f|
172
- f.write generator.run(template, data)
173
- end
174
-
175
- data = {
176
- sha: extract_sha,
177
- version: version,
178
- package: package_file,
179
- source: source
180
- }
181
-
182
- File.open(build_file, 'w') do |f|
183
- f.write generator.run(template, data)
184
- end
185
- end
186
- end
187
-
188
- desc 'Build package'
189
- task build: 'archlinux:prepare' do
190
- Dir.chdir(archlinux_build_directory) do
191
- sh 'makepkg -f'
192
- end
193
- end
194
-
195
- desc 'Build source package for aur'
196
- task build_source: 'archlinux:prepare' do
197
- Dir.chdir(archlinux_build_directory) do
198
- sh 'makepkg --source'
199
- end
200
- end
201
- end
202
-
203
55
  task 'gem:build' => 'webserver:fetch'
@@ -45,7 +45,7 @@ Feature: Initialize presentation
45
45
  """
46
46
  @import 'normalize.css/normalize';
47
47
  @import 'highlightjs/styles/zenburn';
48
- @import 'reveal.js/css/reveal.min';
48
+ @import 'reveal.js/css/reveal';
49
49
  @import 'reveal.js/css/theme/template/mixins';
50
50
  @import 'reveal.js/css/theme/template/settings';
51
51
  @import 'middleman-presentation-helpers/footer/footer';
@@ -56,7 +56,7 @@ Feature: Initialize presentation
56
56
  And the file "source/javascripts/application.js" should contain:
57
57
  """
58
58
  //= require jquery/dist/jquery
59
- //= require reveal.js/js/reveal.min
59
+ //= require reveal.js/js/reveal
60
60
  //= require reveal.js/lib/js/head.min
61
61
  //= require middleman-presentation-helpers/footer/footer
62
62
  //= require lightbox2/js/lightbox
@@ -69,7 +69,7 @@ Feature: Initialize presentation
69
69
  """
70
70
  @import 'normalize.css/normalize';
71
71
  @import 'highlightjs/styles/zenburn';
72
- @import 'reveal.js/css/reveal.min';
72
+ @import 'reveal.js/css/reveal';
73
73
  @import 'reveal.js/css/theme/template/mixins';
74
74
  @import 'reveal.js/css/theme/template/settings';
75
75
  @import 'middleman-presentation-helpers/footer/footer';
@@ -80,7 +80,7 @@ Feature: Initialize presentation
80
80
  And the file "source/javascripts/application.js" should contain:
81
81
  """
82
82
  //= require jquery/dist/jquery
83
- //= require reveal.js/js/reveal.min
83
+ //= require reveal.js/js/reveal
84
84
  //= require reveal.js/lib/js/head.min
85
85
  //= require middleman-presentation-helpers/footer/footer
86
86
  //= require lightbox2/js/lightbox
@@ -277,7 +277,7 @@ Feature: Initialize presentation
277
277
  Then the file "source/javascripts/application.js" should contain:
278
278
  """
279
279
  //= require jquery/dist/jquery
280
- //= require reveal.js/js/reveal.min
280
+ //= require reveal.js/js/reveal
281
281
  //= require reveal.js/lib/js/head.min
282
282
  //= require middleman-presentation-helpers/footer/footer
283
283
  //= require lightbox2/js/lightbox
@@ -148,16 +148,16 @@ Feature: Add new slide
148
148
  When I successfully run `middleman-presentation create slide 01`
149
149
  Then the output should contain:
150
150
  """
151
- create slides/01.html.md
151
+ create slides/01.html.md
152
152
  """
153
153
 
154
154
  Scenario: Output information that multiple slides were created
155
155
  When I successfully run `middleman-presentation create slide 01 02 03`
156
156
  Then the output should contain:
157
157
  """
158
- create slides/01.html.md
159
- create slides/02.html.md
160
- create slides/03.html.md
158
+ create slides/01.html.md
159
+ create slides/02.html.md
160
+ create slides/03.html.md
161
161
  """
162
162
 
163
163
  Scenario: Output information that a slide already exists
@@ -165,7 +165,7 @@ Feature: Add new slide
165
165
  When I successfully run `middleman-presentation create slide 01`
166
166
  Then the output should contain:
167
167
  """
168
- exist slides/01.html.md
168
+ exist slides/01.html.md
169
169
  """
170
170
 
171
171
  Scenario: Output information that multiple slides already exist
@@ -173,7 +173,7 @@ Feature: Add new slide
173
173
  When I successfully run `middleman-presentation create slide 01 02 03`
174
174
  Then the output should contain:
175
175
  """
176
- exist slides/01.html.md
176
+ exist slides/01.html.md
177
177
  """
178
178
 
179
179
  Scenario: Create Group of slides in subfolder
@@ -4,15 +4,18 @@ require 'middleman-core/cli'
4
4
  require 'middleman-sprockets'
5
5
 
6
6
  require 'set'
7
+ require 'erubis'
7
8
  require 'bundler'
8
9
  require 'English'
9
10
  # require 'ptools'
10
11
  require 'pathname'
11
12
  require 'fileutils'
12
13
  require 'uri'
14
+ require 'thor'
13
15
  require 'addressable/uri'
14
16
  require 'securerandom'
15
17
  require 'launchy'
18
+ require 'colorize'
16
19
  require 'fedux_org_stdlib/app_config'
17
20
  require 'fedux_org_stdlib/logging/logger'
18
21
  require 'fedux_org_stdlib/file_template'
@@ -47,6 +50,7 @@ require 'middleman-presentation-core/middleman_environment'
47
50
  require 'middleman-presentation-core/overwrite_sass'
48
51
  require 'middleman-presentation-core/plugin'
49
52
  require 'middleman-presentation-core/version'
53
+ require 'middleman-presentation-core/ruby'
50
54
  require 'middleman-presentation-core/syntax_highlighter'
51
55
  require 'middleman-presentation-core/list'
52
56
  require 'middleman-presentation-core/asset_store'
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Middleman
3
+ module Middleman
4
+ # Presentation
5
+ module Presentation
6
+ REQUIRED_RUBY_VERSION = '>= 2.1.0'
7
+ end
8
+ end
@@ -3,6 +3,6 @@
3
3
  module Middleman
4
4
  # Presentation
5
5
  module Presentation
6
- VERSION = '0.16.0.rc2'
6
+ VERSION = '0.16.0'
7
7
  end
8
8
  end
@@ -3,6 +3,7 @@ lib = File.expand_path('../../middleman-presentation-core/lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  require 'middleman-presentation-core/version'
6
+ require 'middleman-presentation-core/ruby'
6
7
 
7
8
  Gem::Specification.new do |spec|
8
9
  spec.name = 'middleman-presentation-core'
@@ -19,7 +20,7 @@ Gem::Specification.new do |spec|
19
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
21
 
21
22
  spec.require_paths = ['lib']
22
- spec.required_ruby_version = '>= 2.1.0'
23
+ spec.required_ruby_version = Middleman::Presentation::REQUIRED_RUBY_VERSION
23
24
 
24
25
  spec.add_dependency 'middleman', '~> 3.3.5'
25
26
  spec.add_dependency 'middleman-sprockets', '~> 3.3.8'
@@ -32,6 +33,7 @@ Gem::Specification.new do |spec|
32
33
  spec.add_dependency 'rake'
33
34
  spec.add_dependency 'rubyzip', '~> 1.1.6'
34
35
  spec.add_dependency 'liquid'
36
+ spec.add_dependency 'thor', '~> 0.19.1'
35
37
  spec.add_dependency 'erubis'
36
38
  spec.add_dependency 'kramdown'
37
39
  spec.add_dependency 'nokogiri'
@@ -39,5 +41,6 @@ Gem::Specification.new do |spec|
39
41
  spec.add_dependency 'i18n'
40
42
  spec.add_dependency 'hirb'
41
43
  spec.add_dependency 'rouge'
44
+ spec.add_dependency 'colorize'
42
45
  # spec.add_dependency 'ptools', '>= 1.2.6'
43
46
  end
data/templates/Gemfile.tt CHANGED
@@ -22,6 +22,7 @@ gem 'kramdown'
22
22
  gem 'github-markup'
23
23
  gem 'liquid'
24
24
  gem 'rake'
25
+ gem 'middleman-minify-html'
25
26
 
26
27
  group :debug do
27
28
  gem 'pry'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-presentation-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0.rc2
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-15 00:00:00.000000000 Z
12
+ date: 2015-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman
@@ -165,6 +165,20 @@ dependencies:
165
165
  - - ">="
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: thor
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: 0.19.1
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: 0.19.1
168
182
  - !ruby/object:Gem::Dependency
169
183
  name: erubis
170
184
  requirement: !ruby/object:Gem::Requirement
@@ -263,6 +277,20 @@ dependencies:
263
277
  - - ">="
264
278
  - !ruby/object:Gem::Version
265
279
  version: '0'
280
+ - !ruby/object:Gem::Dependency
281
+ name: colorize
282
+ requirement: !ruby/object:Gem::Requirement
283
+ requirements:
284
+ - - ">="
285
+ - !ruby/object:Gem::Version
286
+ version: '0'
287
+ type: :runtime
288
+ prerelease: false
289
+ version_requirements: !ruby/object:Gem::Requirement
290
+ requirements:
291
+ - - ">="
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
266
294
  description:
267
295
  email:
268
296
  - dev@fedux.org
@@ -401,6 +429,7 @@ files:
401
429
  - lib/middleman-presentation-core/presentation_license_template.rb
402
430
  - lib/middleman-presentation-core/register_extension.rb
403
431
  - lib/middleman-presentation-core/roles/comparable_by_name.rb
432
+ - lib/middleman-presentation-core/ruby.rb
404
433
  - lib/middleman-presentation-core/slide_group.rb
405
434
  - lib/middleman-presentation-core/slide_list.rb
406
435
  - lib/middleman-presentation-core/slide_name.rb
@@ -509,9 +538,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
509
538
  version: 2.1.0
510
539
  required_rubygems_version: !ruby/object:Gem::Requirement
511
540
  requirements:
512
- - - ">"
541
+ - - ">="
513
542
  - !ruby/object:Gem::Version
514
- version: 1.3.1
543
+ version: '0'
515
544
  requirements: []
516
545
  rubyforge_project:
517
546
  rubygems_version: 2.4.5