roger 1.1.2 → 1.1.3

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: b0e25d53fb264823bbd277555be283be84210460
4
- data.tar.gz: a4618896d76651eb6002865640d2e5aa18b9442e
3
+ metadata.gz: 529078b0dd6c7db86bf462cc8c41227781a2ffd6
4
+ data.tar.gz: 5a9ea1e08b310b790b0db1d98eab685050d96b77
5
5
  SHA512:
6
- metadata.gz: 6e4c474bbe2fe95edf3aed26bcf060810764ea55c8e639ea009e27878740479c05f22e69a8c3d76e37afc9680177a597fb10ff1c2743910f9cc52f2851bf6423
7
- data.tar.gz: 50131d49a34dd8b8bb7fa9568066975469c3c6b4d877d3670d68196e60bdc937a741a973e07e2fd9239b5a75bde589eb338e7f0ac82e5cfc27e7d3c2a4e7736d
6
+ metadata.gz: 136bbf5bda373b17f22552debc7ab00a86dc14e4f58eb4c10d031fee800e9eee21802620482c848c9f8a02cc39b2a64e1a30bd14143e890898b363d9e82042bf
7
+ data.tar.gz: 223c5f6a9e329d6e6a9f4913a5925c587f51106bb261f31190c00df03483e77a57fdcca37c3c1529819e7e094f8d0ef7dcc00000ca80d6eb647da5225804ad8b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.1.3
4
+ * Add `--version` flag so we can ask what version of Roger we're running.
5
+
3
6
  ## Version 1.1.2
4
7
 
5
8
  * Fix issue where nested `content_for` statements or partials with blocks within a `content_for` block would yield multiple times.
data/lib/roger/cli.rb CHANGED
@@ -13,6 +13,7 @@ require 'pathname'
13
13
  require 'fileutils'
14
14
  include FileUtils
15
15
 
16
+ require File.dirname(__FILE__) + "/version"
16
17
  require File.dirname(__FILE__) + "/template"
17
18
  require File.dirname(__FILE__) + "/project"
18
19
 
@@ -67,6 +68,8 @@ module Roger
67
68
  :default => false,
68
69
  :type => :boolean
69
70
 
71
+ map %w{--version} => :version
72
+
70
73
  desc "test [COMMAND]", "Run one or more tests. Test can be 'all' for all defined tests or a specific test name"
71
74
  subcommand "test", Cli::Test
72
75
 
@@ -79,6 +82,11 @@ module Roger
79
82
  register Cli::Release, "release", "release #{Cli::Release.arguments.map{ |arg| arg.banner }.join(" ")}", Cli::Release.desc
80
83
  self.tasks["release"].options = Cli::Release.class_options
81
84
 
85
+ desc "version", "Get the current Roger version"
86
+ def version
87
+ shell.say "Roger #{Roger::VERSION}"
88
+ end
89
+
82
90
  protected
83
91
 
84
92
  # TODO: handle options
@@ -0,0 +1,3 @@
1
+ module Roger
2
+ VERSION = "1.1.3"
3
+ end
data/roger.gemspec CHANGED
@@ -1,8 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
+ require_relative "lib/roger/version"
4
+
3
5
  Gem::Specification.new do |s|
4
6
  s.name = "roger"
5
- s.version = "1.1.2"
7
+ s.version = Roger::VERSION
6
8
 
7
9
  s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns"]
8
10
  s.email = ["info@digitpaint.nl", "flurin@digitpaint.nl"]
@@ -20,5 +20,9 @@ module Roger
20
20
  assert_includes Cli::Base.tasks.keys, "generate"
21
21
  end
22
22
 
23
+ def test_has_version_command
24
+ assert_includes Cli::Base.tasks.keys, "version"
25
+ end
26
+
23
27
  end
24
28
  end
@@ -0,0 +1,21 @@
1
+ require "./lib/roger/cli.rb"
2
+ require "test/unit"
3
+
4
+ require File.dirname(__FILE__) + "/../../helpers/cli"
5
+
6
+
7
+ module Roger
8
+ class CliVersionTest < ::Test::Unit::TestCase
9
+ include TestCli
10
+
11
+ def test_minus_minus_verson
12
+ out,err = run_command(%w{--version})
13
+ assert_includes out, Roger::VERSION
14
+ end
15
+
16
+ def test_version_command
17
+ out,err = run_command(%w{version})
18
+ assert_includes out, Roger::VERSION
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-02 00:00:00.000000000 Z
13
+ date: 2015-06-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -204,6 +204,7 @@ files:
204
204
  - lib/roger/server.rb
205
205
  - lib/roger/template.rb
206
206
  - lib/roger/test.rb
207
+ - lib/roger/version.rb
207
208
  - roger.gemspec
208
209
  - test/Mockupfile-syntax.rb
209
210
  - test/helpers/cli.rb
@@ -245,6 +246,7 @@ files:
245
246
  - test/unit/cli/cli_generate_test.rb
246
247
  - test/unit/cli/cli_serve_test.rb
247
248
  - test/unit/cli/cli_test_test.rb
249
+ - test/unit/cli/cli_version_test.rb
248
250
  - test/unit/generators_test.rb
249
251
  - test/unit/release/cleaner_test.rb
250
252
  - test/unit/release/finalizers/git_branch_test.rb
@@ -319,6 +321,7 @@ test_files:
319
321
  - test/unit/cli/cli_generate_test.rb
320
322
  - test/unit/cli/cli_serve_test.rb
321
323
  - test/unit/cli/cli_test_test.rb
324
+ - test/unit/cli/cli_version_test.rb
322
325
  - test/unit/generators_test.rb
323
326
  - test/unit/release/cleaner_test.rb
324
327
  - test/unit/release/finalizers/git_branch_test.rb