simple_interaction-rails 0.0.1
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 +7 -0
- data/.gitignore +15 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +61 -0
- data/Rakefile +2 -0
- data/lib/generators/USAGE +15 -0
- data/lib/generators/interaction_generator.rb +14 -0
- data/lib/generators/templates/interaction.rb +9 -0
- data/lib/simple_interaction/rails/version.rb +5 -0
- data/lib/simple_interaction-rails.rb +10 -0
- data/simple_interaction-rails.gemspec +27 -0
- data/test/generators/interaction_generator_test.rb +0 -0
- metadata +113 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9a21a318c67b94f655ec7c4c509002350b414a69
|
4
|
+
data.tar.gz: b4146d40ddba1e8ee20da2d64ff8af822bab1870
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 02539b80f406ae401503e017f5d98340ad0f74767da296d3bddd26d43bcac99c9941242318df8c7619d151d6a7f2979123d06068c1ec273ca5ebe4ba1bfd7f2e
|
7
|
+
data.tar.gz: a73edeab216eab92b2c0f4bbe0165c9abb1ad3a5a73124b38955b25219b9e35354c00ac5ddb7a54a9c472fdddc2c0adb5d956644193d9db29999f46887ffbdfd
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Jose Boza
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# SimpleInteraction::Rails
|
2
|
+
|
3
|
+
This is a work in progress tests are missing! And test generator is missing too
|
4
|
+
|
5
|
+
This simply add a generator to your rails app to create interaction files
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'simple_interaction-rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install simple_interaction-rails
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```
|
26
|
+
rails generate interaction NAME [options]
|
27
|
+
|
28
|
+
Options:
|
29
|
+
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications)
|
30
|
+
[--requirements=one two three] # Indicates when to generate requirements
|
31
|
+
|
32
|
+
Runtime options:
|
33
|
+
-f, [--force] # Overwrite files that already exist
|
34
|
+
-p, [--pretend], [--no-pretend] # Run but do not make any changes
|
35
|
+
-q, [--quiet], [--no-quiet] # Suppress status output
|
36
|
+
-s, [--skip], [--no-skip] # Skip files that already exist
|
37
|
+
|
38
|
+
Description:
|
39
|
+
Generates a new interaction on app/interactions folder
|
40
|
+
|
41
|
+
Example:
|
42
|
+
rails generate interaction Users::Create options
|
43
|
+
|
44
|
+
This will create:
|
45
|
+
app/interactions/users/create.rb
|
46
|
+
|
47
|
+
module Users
|
48
|
+
class Create
|
49
|
+
requires options
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
## Contributing
|
56
|
+
|
57
|
+
1. Fork it ( https://github.com/[my-github-username]/simple_interaction-rails/fork )
|
58
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
59
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
60
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
61
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Description:
|
2
|
+
Generates a new interaction on app/interactions folder
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate interaction Users::Create options
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/interactions/users/create.rb
|
9
|
+
|
10
|
+
module Users
|
11
|
+
class Create
|
12
|
+
requires options
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rails/generators/named_base'
|
2
|
+
|
3
|
+
class InteractionGenerator < ::Rails::Generators::NamedBase
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
5
|
+
class_option :requirements, type: 'array', default: []
|
6
|
+
|
7
|
+
def create_interaction_file
|
8
|
+
puts options
|
9
|
+
template "interaction.rb", File.join('app/interactions/', class_path, "#{file_name}.rb")
|
10
|
+
end
|
11
|
+
|
12
|
+
#hook_for :test_framework
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'simple_interaction/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "simple_interaction-rails"
|
8
|
+
spec.version = SimpleInteraction::Rails::VERSION
|
9
|
+
spec.authors = ["Jose Boza"]
|
10
|
+
spec.email = ["jaboza@gmail.com"]
|
11
|
+
spec.summary = %q{Simple Interaction Generators for your Rails app}
|
12
|
+
spec.description = %q{}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
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)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency "simple_interaction", "~> 0.0.1"
|
25
|
+
spec.add_dependency 'rails', '>= 4.2'
|
26
|
+
|
27
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_interaction-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jose Boza
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simple_interaction
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.2'
|
69
|
+
description: ''
|
70
|
+
email:
|
71
|
+
- jaboza@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- LICENSE.txt
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- lib/generators/USAGE
|
82
|
+
- lib/generators/interaction_generator.rb
|
83
|
+
- lib/generators/templates/interaction.rb
|
84
|
+
- lib/simple_interaction-rails.rb
|
85
|
+
- lib/simple_interaction/rails/version.rb
|
86
|
+
- simple_interaction-rails.gemspec
|
87
|
+
- test/generators/interaction_generator_test.rb
|
88
|
+
homepage: ''
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.2.2
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: Simple Interaction Generators for your Rails app
|
112
|
+
test_files:
|
113
|
+
- test/generators/interaction_generator_test.rb
|