light-service 0.2.1 → 0.2.2

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: 075a5390fc8de72c59eb0f3be049cff74a286a48
4
- data.tar.gz: 7a86920ff7b6e4fe62d9123a3b868741cca216eb
3
+ metadata.gz: 481bcf8e63d44965c219dff04ab8889681ffb592
4
+ data.tar.gz: b34c8d452cc394a8608b8d1387c83eb49b3fc807
5
5
  SHA512:
6
- metadata.gz: 3c35a6ce18183266e3df8aaa361b9d5271c95330507e276c0393bfbfea82614b5890d3ed043a3ce64bcd3912cdbb96ef7fe6b5b10d3785e8760ddeb796bff2c6
7
- data.tar.gz: d2083efec69ab5b70ff3befe6f428ce742e687ab6e6f3ac8c32e7447970905e573cd6741c7f35460dd7842e40ab52b90ad1603a03866dcd1cc959367496590c6
6
+ metadata.gz: 40c7652d305c27fe6f07bcd21c8b4478e534f4f0efa5298a9cb076333fcab02b76ee6d6f841e76ed3eaf38103525fe598f697c9fb64c0b3cab60e1606568fa8c
7
+ data.tar.gz: 824c92c2b6117867bb9e1a40d087249838622872162be5f28d6b7f1197b98787b6cf4bb6e4dc2bee9e10c53d88a288c08b95d15ca333b2e45e06901245cc7739
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ![LightService](https://raw.github.com/adomokos/light-service/master/resources/light-service.png)
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/light-service.svg)](https://rubygems.org/gems/light-service)
3
4
  [![Build Status](https://secure.travis-ci.org/adomokos/light-service.png)](http://travis-ci.org/adomokos/light-service)
4
-
5
5
  [![Code Climate](https://codeclimate.com/github/adomokos/light-service.png)](https://codeclimate.com/github/adomokos/light-service)
6
6
 
7
7
  What do you think of this code?
@@ -188,6 +188,9 @@ For further examples, please visit the project's [Wiki](https://github.com/adomo
188
188
  Huge thanks to the [contributors](https://github.com/adomokos/light-service/graphs/contributors)!
189
189
 
190
190
  ## Release Notes
191
+ ### 0.2.2
192
+ * Adding the gem version icon to README
193
+ * Actions can be invoked now [without arguments](https://github.com/adomokos/light-service/commit/244d5f03b9dbf61c97c1fdb865e6587f9aea177d), this makes it super easy to play with an action in the command line
191
194
 
192
195
  ### 0.2.1
193
196
  * [Improving](https://github.com/adomokos/light-service/commit/fc7043241396b4a2556e9664c13c6929f8330025) deprecation warning for the renamed methods
@@ -7,7 +7,7 @@ module LightService
7
7
 
8
8
  module Macros
9
9
  def executed
10
- define_singleton_method "execute" do |context|
10
+ define_singleton_method "execute" do |context = {}|
11
11
  action_context = create_action_context(context)
12
12
  return action_context if action_context.failure? || action_context.skip_all?
13
13
 
@@ -1,3 +1,3 @@
1
1
  module LightService
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/spec/action_spec.rb CHANGED
@@ -64,7 +64,7 @@ module LightService
64
64
  result.to_hash.should eq ({:test_key => "test_value"})
65
65
  end
66
66
 
67
- context "can take hash as an argument" do
67
+ context "when invoked with hash" do
68
68
  it "creates LightService::Context implicitly" do
69
69
  result = DummyAction.execute(some_key: "some value")
70
70
 
@@ -72,5 +72,13 @@ module LightService
72
72
  expect(result.keys).to eq([:some_key, :test_key])
73
73
  end
74
74
  end
75
+ context "when invoked without arguments" do
76
+ it "creates LightService::Context implicitly" do
77
+ result = DummyAction.execute
78
+
79
+ expect(result).to be_success
80
+ expect(result.keys).to eq([:test_key])
81
+ end
82
+ end
75
83
  end
76
84
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Attila Domokos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec