motion_flux 0.0.3 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9f2340bfd4dc6887ea956c8219ce5fa20cc3a38
4
- data.tar.gz: 7ccc976a642cf10a37453b4e3e0887b6ecf647ef
3
+ metadata.gz: 8d9511e7f5144c24d67746439ca81e028226abe1
4
+ data.tar.gz: ab309158b5fc77c74910cff5c73a938c23734767
5
5
  SHA512:
6
- metadata.gz: fc47fad05d89747703db10bcc0502badf85a6c9cdb2029b8712e10e2291caa34f0b8400a783742923b6b55ee8e674f1d04e69255b337703b5655efddbc30a50d
7
- data.tar.gz: eb409e288cf69a0c389701cf2b2727282c480793a1407af35a82b2f22fce996328b1cc938eff4fb03b6d281df0c9e2f3a62786c202e58ba600275611c6291782
6
+ metadata.gz: 57192a8a003fb9aa3614a23a8c9d8231faa4710bb008d0a4d7661753d0867345b632548c38bc079998a0205fc31c743cc69b6a81d40475d990e289f2a9c0b3be
7
+ data.tar.gz: c2c39d3abc3a7ae976839773e6f8c7629ea3857d852e969631af7295e2f15ec59d9881d2a5e7355708f3080387800e286d8d95e24021e6bb2464ef3a2365a09b
data/README.md CHANGED
@@ -24,10 +24,18 @@ Or install it yourself as:
24
24
 
25
25
  TODO: Write usage instructions here
26
26
 
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
27
33
  ## Contributing
28
34
 
29
- 1. Fork it ( https://github.com/kayhide/motion_flux/fork )
30
- 2. Create your feature branch (`git checkout -b my-new-feature`)
31
- 3. Commit your changes (`git commit -am 'Add some feature'`)
32
- 4. Push to the branch (`git push origin my-new-feature`)
33
- 5. Create a new Pull Request
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kayhide/motion_flux. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "motion_blender"
5
+
6
+ require "pry"
7
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/lib/motion_flux.rb CHANGED
@@ -1,13 +1,10 @@
1
- if defined?(Motion::Project::Config)
2
- Motion::Project::App.setup do |app|
3
- dir = File.dirname(__FILE__)
4
- Dir.glob(File.join(dir, 'motion_flux/*.rb')).each do |file|
5
- app.files.unshift(file)
6
- end
7
- end
8
- else
9
- require 'motion_flux/version'
10
- require 'motion_flux/action'
11
- require 'motion_flux/dispatcher'
12
- require 'motion_flux/store'
13
- end
1
+ require 'motion_blender'
2
+ MotionBlender.add __FILE__
3
+
4
+ require 'motion-support/concern'
5
+ require 'motion-support/core_ext'
6
+
7
+ require 'motion_flux/version'
8
+ require 'motion_flux/action'
9
+ require 'motion_flux/dispatcher'
10
+ require 'motion_flux/store'
@@ -1,3 +1,3 @@
1
1
  module MotionFlux
2
- VERSION = '0.0.3'
2
+ VERSION = '0.1.0'
3
3
  end
data/motion_flux.gemspec CHANGED
@@ -8,17 +8,20 @@ Gem::Specification.new do |spec|
8
8
  spec.version = MotionFlux::VERSION
9
9
  spec.authors = ['kayhide']
10
10
  spec.email = ['kayhide@gmail.com']
11
+
11
12
  spec.summary = 'MotionFlux supports to build Flux-based RubyMotion apps.'
12
13
  spec.description = 'MotionFlux supports to build Flux-based RubyMotion apps.'
13
14
  spec.homepage = 'https://github.com/kayhide/motion_flux'
14
15
  spec.license = 'MIT'
15
16
 
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = 'exe'
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
20
  spec.require_paths = ['lib']
20
21
 
21
- spec.add_development_dependency 'bundler', '~> 1.7'
22
+ spec.add_runtime_dependency 'motion_blender'
23
+ spec.add_runtime_dependency 'motion_blender-support'
24
+ spec.add_development_dependency 'bundler', '~> 1.10'
22
25
  spec.add_development_dependency 'rake', '~> 10.0'
23
26
  spec.add_development_dependency 'rspec'
24
27
  spec.add_development_dependency 'fuubar'
metadata CHANGED
@@ -1,29 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion_flux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kayhide
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-27 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: motion_blender
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
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: motion_blender-support
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: bundler
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
45
  - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: '1.7'
47
+ version: '1.10'
20
48
  type: :development
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: '1.7'
54
+ version: '1.10'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rake
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -180,17 +208,14 @@ files:
180
208
  - LICENSE.txt
181
209
  - README.md
182
210
  - Rakefile
211
+ - bin/console
212
+ - bin/setup
183
213
  - lib/motion_flux.rb
184
214
  - lib/motion_flux/action.rb
185
215
  - lib/motion_flux/dispatcher.rb
186
216
  - lib/motion_flux/store.rb
187
217
  - lib/motion_flux/version.rb
188
218
  - motion_flux.gemspec
189
- - spec/motion_flux/action_spec.rb
190
- - spec/motion_flux/dispatcher_spec.rb
191
- - spec/motion_flux/store_spec.rb
192
- - spec/motion_flux_spec.rb
193
- - spec/spec_helper.rb
194
219
  homepage: https://github.com/kayhide/motion_flux
195
220
  licenses:
196
221
  - MIT
@@ -211,14 +236,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
236
  version: '0'
212
237
  requirements: []
213
238
  rubyforge_project:
214
- rubygems_version: 2.2.2
239
+ rubygems_version: 2.4.5.1
215
240
  signing_key:
216
241
  specification_version: 4
217
242
  summary: MotionFlux supports to build Flux-based RubyMotion apps.
218
- test_files:
219
- - spec/motion_flux/action_spec.rb
220
- - spec/motion_flux/dispatcher_spec.rb
221
- - spec/motion_flux/store_spec.rb
222
- - spec/motion_flux_spec.rb
223
- - spec/spec_helper.rb
243
+ test_files: []
224
244
  has_rdoc:
@@ -1,26 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MotionFlux::Action do
4
- class SomeAction < MotionFlux::Action; end
5
-
6
- describe '#to_s' do
7
- before do
8
- @action = SomeAction.new(:sometiong, 'arg')
9
- end
10
-
11
- it 'returns string' do
12
- expect(@action.to_s).to eq 'SomeAction:sometiong'
13
- end
14
- end
15
-
16
- describe '#dispatch' do
17
- before do
18
- @action = SomeAction.new(:sometiong, 'arg')
19
- end
20
-
21
- it 'calls MotionFlex::Dispatcher.dispatch' do
22
- expect(MotionFlux::Dispatcher).to receive(:dispatch).with(@action)
23
- @action.dispatch
24
- end
25
- end
26
- end
@@ -1,55 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MotionFlux::Dispatcher do
4
- class SomeAction < MotionFlux::Action; end
5
- class AnotherAction < MotionFlux::Action; end
6
-
7
- describe '.dispatch' do
8
- before do
9
- @store = double
10
- MotionFlux::Dispatcher.register @store, SomeAction
11
- end
12
-
13
- after do
14
- MotionFlux::Dispatcher.clear
15
- end
16
-
17
- it 'calls store method' do
18
- expect(@store).to receive(:something)
19
- MotionFlux::Dispatcher.dispatch SomeAction.new(:something)
20
- end
21
-
22
- it 'skips if store does not respond' do
23
- expect {
24
- MotionFlux::Dispatcher.dispatch SomeAction.new(:something)
25
- }.not_to raise_error
26
- end
27
-
28
- it 'skips if action is not registered' do
29
- expect(@store).not_to receive(:something)
30
- MotionFlux::Dispatcher.dispatch AnotherAction.new(:something)
31
- end
32
- end
33
-
34
- describe '.exclusive_run' do
35
- it 'calls given block' do
36
- obj = double
37
- expect(obj).to receive(:something)
38
- MotionFlux::Dispatcher.exclusive_run 'first' do
39
- obj.something
40
- end
41
- end
42
-
43
- it 'skips second block' do
44
- obj = double
45
- expect(obj).to receive(:something)
46
- expect(obj).not_to receive(:other_thing)
47
- MotionFlux::Dispatcher.exclusive_run 'first' do
48
- obj.something
49
- MotionFlux::Dispatcher.exclusive_run 'second' do
50
- obj.other_thing
51
- end
52
- end
53
- end
54
- end
55
- end
@@ -1,45 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MotionFlux::Store do
4
- class SomeAction < MotionFlux::Action; end
5
-
6
- class SomeStore < MotionFlux::Store; end
7
-
8
- describe '.subscribe' do
9
- it 'calls MotionFlex::Dispatcher.register' do
10
- expect(MotionFlux::Dispatcher)
11
- .to receive(:register).with(SomeStore.instance, SomeAction)
12
- SomeStore.subscribe SomeAction
13
- end
14
- end
15
-
16
- describe '.on' do
17
- it 'appends handler' do
18
- expect {
19
- SomeStore.on :event do
20
- true
21
- end
22
- }.to change(SomeStore.handlers, :count).by(1)
23
- end
24
- end
25
-
26
- describe '.emit' do
27
- it 'calls handler' do
28
- handler = double
29
- expect(handler).to receive(:call)
30
- SomeStore.handlers[:event] << handler
31
- SomeStore.emit :event
32
- end
33
- end
34
-
35
- describe '#emit' do
36
- before do
37
- @store = SomeStore.instance
38
- end
39
-
40
- it 'calls MotionFlex::Store.emit' do
41
- expect(SomeStore).to receive(:emit).with(:event)
42
- @store.emit :event
43
- end
44
- end
45
- end
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MotionFlux do
4
- it 'has a version number' do
5
- expect(MotionFlux::VERSION).not_to be nil
6
- end
7
- end
data/spec/spec_helper.rb DELETED
@@ -1,9 +0,0 @@
1
- require 'simplecov'
2
- require 'simplecov-gem-profile'
3
- SimpleCov.start 'gem'
4
-
5
- ENV['RUBYMOTION_ENV'] ||= 'test'
6
- require 'pry'
7
-
8
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
9
- require 'motion_flux'