administrate-field-state_machine 0.1.2 → 0.2.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
- SHA1:
3
- metadata.gz: dda33dc7cb21fd245f98a82f413ab49ae22dca67
4
- data.tar.gz: fc03c2a08ffca1c433daec5db81b9e8ca66091b9
2
+ SHA256:
3
+ metadata.gz: 675dd920eca9b0bd7bc7adcc35118a38f66eb924b5d2f306b3c8cfdee27f1fe1
4
+ data.tar.gz: 63b1acdf4aecd0f16ee709cb6f43df4a5fccb2b09c0fceca7540a44cb75e8fd1
5
5
  SHA512:
6
- metadata.gz: c4c90e0aa390766a0e17defead2d4e417e342296ea8d041598f07ee484d073f87ed6d4dbd66d3444bff19a7378633b226a916149f3be622e89f978256ab4cc32
7
- data.tar.gz: 3b86832d2187b4810738a3913836eb7d0047d33947f9d8687e23023656ffed508080e6b5ed8dfbde655694164a7d318d2b01ff2e19e5a24be8f189af388135e8
6
+ metadata.gz: 7242ee51a0c71109c78ac17261459024d90befd31f6a551cceb491801eb1694ffa3336b63edfe0f8fb816f04596e5943b69d4789d6d4947756ee155248465286
7
+ data.tar.gz: 9c4f4654f343f9edf9b5802f22bbfa6d4b1179e3f9081dd50164cdba3e5451f08669cf27f63c70a37c8aa6a060cf6a3f28f5c8187a64f136a5ceed255ffc03f8
data/.gitignore CHANGED
@@ -1 +1,4 @@
1
1
  *.gem
2
+ .prettierrc
3
+ .ruby-gemset
4
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.5
data/.travis.yml ADDED
@@ -0,0 +1 @@
1
+ language: ruby
data/CHANGELOG.md CHANGED
@@ -1,34 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.2.0](https://github.com/zooppa/administrate-field-state_machine/tree/v0.2.0) (2022-01-06)
4
+
5
+ [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.1.2...v0.2.0)
6
+
7
+ - Add support for Rails 7
8
+
3
9
  ## [v0.1.2](https://github.com/zooppa/administrate-field-state_machine/tree/v0.1.2) (2017-03-20)
10
+
4
11
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.1.1...v0.1.2)
5
12
 
6
- * Bump up Administrate dependency
13
+ - Bump up Administrate dependency
7
14
 
8
15
  ## [v0.1.1](https://github.com/zooppa/administrate-field-state_machine/tree/v0.1.1) (2017-03-20)
16
+
9
17
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.1.0...v0.1.1)
10
18
 
11
- * Bump up Administrate dependency
19
+ - Bump up Administrate dependency
12
20
 
13
21
  ## [v0.1.0](https://github.com/zooppa/administrate-field-state_machine/tree/v0.1.0) (2016-12-13)
22
+
14
23
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.0.4...v0.1.0)
15
24
 
16
- * Add current state in edit mode
25
+ - Add current state in edit mode
17
26
 
18
27
  ## [v0.0.4](https://github.com/zooppa/administrate-field-state_machine/tree/v0.0.4) (2016-11-29)
28
+
19
29
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.0.3...v0.0.4)
20
30
 
21
- * Fix engine class declaration
31
+ - Fix engine class declaration
22
32
 
23
33
  ## [v0.0.3](https://github.com/zooppa/administrate-field-state_machine/tree/v0.0.3) (2016-11-25)
34
+
24
35
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.0.2...v0.0.3)
25
36
 
26
- * Humanize state name
37
+ - Humanize state name
27
38
 
28
39
  ## [v0.0.2](https://github.com/zooppa/administrate-field-state_machine/tree/v0.0.2) (2016-11-25)
40
+
29
41
  [Full Changelog](https://github.com/zooppa/administrate-field-state_machine/compare/v0.0.1...v0.0.2)
30
42
 
31
- * Switch to selecting transitions rather than states
43
+ - Switch to selecting transitions rather than states
32
44
 
33
45
  ## [v0.0.1](https://github.com/zooppa/administrate-field-state_machine/tree/v0.0.1) (2016-11-16)
46
+
34
47
  First release
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2015-2016 z.productions.
3
+ Copyright (c) 2018 Zooppa
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,21 +1,26 @@
1
1
  # Administrate::Field::StateMachine
2
2
 
3
+ [![Build Status](https://travis-ci.com/zooppa/administrate-field-state_machine.svg?branch=master)](https://travis-ci.com/zooppa/administrate-field-state_machine)
3
4
  [![Code Climate](https://codeclimate.com/github/zooppa/administrate-field-state_machine/badges/gpa.svg)](https://codeclimate.com/github/zooppa/administrate-field-state_machine)
4
5
 
5
6
  A plugin to handle [state machine] attributes in [Administrate].
6
7
 
7
- ## IMPORTANT NOTICE
8
- This gem relies on the original resource being passed to the field.
9
- This functionality is not yet merged in Administrate
10
- ([a PR has been in review for a while](thoughtbot/administrate#381)),
11
- so you will have to fork and [patch it](https://git.io/vXhCo) yourself.
8
+ ---
9
+
10
+ ### IMPORTANT NOTICE
11
+
12
+ **This gem is not actively maintained anymore**.
13
+
14
+ If you’re interested in taking over and steward the project moving forward, please get in touch.
15
+
16
+ ---
12
17
 
13
18
  ## Usage
14
19
 
15
20
  Add it to your `Gemfile`:
16
21
 
17
22
  ```ruby
18
- gem 'administrate-field-state_machine', '~> 0.1.2'
23
+ gem 'administrate-field-state_machine', '~> 0.2.0'
19
24
  ```
20
25
 
21
26
  Run:
@@ -44,8 +49,8 @@ end
44
49
 
45
50
  ## About
46
51
 
47
- Administrate::Field::StateMachine is maintained by [z.productions].
52
+ Administrate::Field::StateMachine is maintained by [Zooppa].
48
53
 
49
54
  [state machine]: https://github.com/state-machines/state_machines
50
- [Administrate]: https://github.com/thoughtbot/administrate
51
- [z.productions]: https://www.z.productions/
55
+ [administrate]: https://github.com/thoughtbot/administrate
56
+ [zooppa]: https://www.zooppa.com/
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -1,13 +1,13 @@
1
- $:.push File.expand_path('../lib', __FILE__)
1
+ $:.push File.expand_path('lib', __dir__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'administrate-field-state_machine'
5
- gem.version = '0.1.2'
6
- gem.authors = ['Michele Gerarduzzi']
7
- gem.email = ['michele.gerarduzzi@gmail.com']
5
+ gem.version = '0.2.0'
6
+ gem.authors = ['Zooppa']
7
+ gem.email = ['dev@zooppa.com']
8
8
  gem.homepage = 'https://github.com/zooppa/administrate-field-state_machine'
9
- gem.summary = 'A plugin to handle state machine attributes in Administrate'
10
- gem.description = gem.summary
9
+ gem.summary = 'State machine plugin for Administrate'
10
+ gem.description = 'A plugin to handle state machine attributes in Administrate'
11
11
  gem.license = 'MIT'
12
12
 
13
13
  gem.require_paths = ['lib']
@@ -15,5 +15,8 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
 
17
17
  gem.add_runtime_dependency 'administrate', '< 1.0.0'
18
- gem.add_runtime_dependency 'rails', '>= 4.2'
18
+ gem.add_runtime_dependency 'rails', '>= 4.2', '< 8'
19
+
20
+ gem.add_development_dependency 'rake', '~> 13.0'
21
+ gem.add_development_dependency 'rspec', '~> 3.8'
19
22
  end
@@ -1,5 +1,6 @@
1
- require 'administrate/field/base'
2
1
  require 'rails'
2
+ require 'administrate/field/base'
3
+ require 'administrate/engine'
3
4
 
4
5
  module Administrate
5
6
  module Field
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe Administrate::Field::StateMachine do
4
+ subject { described_class.new(:field, data, :show) }
5
+
6
+ describe '#to_partial_path' do
7
+ let(:data) { '' }
8
+
9
+ it 'returns a partial based on the page being rendered' do
10
+ path = subject.to_partial_path
11
+ expect(path).to eq('/fields/state_machine/show')
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'administrate/field/state_machine'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-state_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - Michele Gerarduzzi
8
- autorequire:
7
+ - Zooppa
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-03 00:00:00.000000000 Z
11
+ date: 2022-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.2'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '8'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,30 +41,66 @@ dependencies:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '4.2'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '8'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '13.0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '13.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rspec
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.8'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.8'
41
75
  description: A plugin to handle state machine attributes in Administrate
42
76
  email:
43
- - michele.gerarduzzi@gmail.com
77
+ - dev@zooppa.com
44
78
  executables: []
45
79
  extensions: []
46
80
  extra_rdoc_files: []
47
81
  files:
48
82
  - ".gitignore"
83
+ - ".rspec"
84
+ - ".ruby-version"
85
+ - ".travis.yml"
49
86
  - CHANGELOG.md
50
87
  - Gemfile
51
- - Gemfile.lock
52
88
  - LICENSE.md
53
89
  - README.md
90
+ - Rakefile
54
91
  - administrate-field-state_machine.gemspec
55
92
  - app/assets/stylesheets/administrate-field-state_machine/application.css
56
93
  - app/views/fields/state_machine/_form.html.erb
57
94
  - app/views/fields/state_machine/_index.html.erb
58
95
  - app/views/fields/state_machine/_show.html.erb
59
96
  - lib/administrate/field/state_machine.rb
97
+ - spec/lib/administrate/field/state_machine_spec.rb
98
+ - spec/spec_helper.rb
60
99
  homepage: https://github.com/zooppa/administrate-field-state_machine
61
100
  licenses:
62
101
  - MIT
63
102
  metadata: {}
64
- post_install_message:
103
+ post_install_message:
65
104
  rdoc_options: []
66
105
  require_paths:
67
106
  - lib
@@ -76,9 +115,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
115
  - !ruby/object:Gem::Version
77
116
  version: '0'
78
117
  requirements: []
79
- rubyforge_project:
80
- rubygems_version: 2.6.11
81
- signing_key:
118
+ rubygems_version: 3.1.6
119
+ signing_key:
82
120
  specification_version: 4
83
- summary: A plugin to handle state machine attributes in Administrate
84
- test_files: []
121
+ summary: State machine plugin for Administrate
122
+ test_files:
123
+ - spec/lib/administrate/field/state_machine_spec.rb
124
+ - spec/spec_helper.rb
data/Gemfile.lock DELETED
@@ -1,159 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- administrate-field-state_machine (0.1.2)
5
- administrate (< 1.0.0)
6
- rails (>= 4.2)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actioncable (5.0.2)
12
- actionpack (= 5.0.2)
13
- nio4r (>= 1.2, < 3.0)
14
- websocket-driver (~> 0.6.1)
15
- actionmailer (5.0.2)
16
- actionpack (= 5.0.2)
17
- actionview (= 5.0.2)
18
- activejob (= 5.0.2)
19
- mail (~> 2.5, >= 2.5.4)
20
- rails-dom-testing (~> 2.0)
21
- actionpack (5.0.2)
22
- actionview (= 5.0.2)
23
- activesupport (= 5.0.2)
24
- rack (~> 2.0)
25
- rack-test (~> 0.6.3)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.0.2)
29
- activesupport (= 5.0.2)
30
- builder (~> 3.1)
31
- erubis (~> 2.7.0)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.0.2)
35
- activesupport (= 5.0.2)
36
- globalid (>= 0.3.6)
37
- activemodel (5.0.2)
38
- activesupport (= 5.0.2)
39
- activerecord (5.0.2)
40
- activemodel (= 5.0.2)
41
- activesupport (= 5.0.2)
42
- arel (~> 7.0)
43
- activesupport (5.0.2)
44
- concurrent-ruby (~> 1.0, >= 1.0.2)
45
- i18n (~> 0.7)
46
- minitest (~> 5.1)
47
- tzinfo (~> 1.1)
48
- administrate (0.4.0)
49
- autoprefixer-rails (~> 6.0)
50
- bourbon (~> 4.2)
51
- datetime_picker_rails (~> 0.0.7)
52
- jquery-rails (~> 4.0)
53
- kaminari (~> 0.16)
54
- momentjs-rails (~> 2.8)
55
- neat (~> 1.1)
56
- normalize-rails (~> 3.0)
57
- rails (>= 4.2, < 5.1)
58
- sass-rails (~> 5.0)
59
- selectize-rails (~> 0.6)
60
- arel (7.1.4)
61
- autoprefixer-rails (6.7.7)
62
- execjs
63
- bourbon (4.3.3)
64
- sass (~> 3.4)
65
- thor (~> 0.19)
66
- builder (3.2.3)
67
- concurrent-ruby (1.0.5)
68
- datetime_picker_rails (0.0.7)
69
- momentjs-rails (>= 2.8.1)
70
- erubis (2.7.0)
71
- execjs (2.7.0)
72
- globalid (0.3.7)
73
- activesupport (>= 4.1.0)
74
- i18n (0.8.1)
75
- jquery-rails (4.2.2)
76
- rails-dom-testing (>= 1, < 3)
77
- railties (>= 4.2.0)
78
- thor (>= 0.14, < 2.0)
79
- kaminari (0.17.0)
80
- actionpack (>= 3.0.0)
81
- activesupport (>= 3.0.0)
82
- loofah (2.0.3)
83
- nokogiri (>= 1.5.9)
84
- mail (2.6.4)
85
- mime-types (>= 1.16, < 4)
86
- method_source (0.8.2)
87
- mime-types (3.1)
88
- mime-types-data (~> 3.2015)
89
- mime-types-data (3.2016.0521)
90
- mini_portile2 (2.1.0)
91
- minitest (5.10.1)
92
- momentjs-rails (2.17.1)
93
- railties (>= 3.1)
94
- neat (1.8.0)
95
- sass (>= 3.3)
96
- thor (~> 0.19)
97
- nio4r (2.0.0)
98
- nokogiri (1.7.1)
99
- mini_portile2 (~> 2.1.0)
100
- normalize-rails (3.0.3)
101
- rack (2.0.1)
102
- rack-test (0.6.3)
103
- rack (>= 1.0)
104
- rails (5.0.2)
105
- actioncable (= 5.0.2)
106
- actionmailer (= 5.0.2)
107
- actionpack (= 5.0.2)
108
- actionview (= 5.0.2)
109
- activejob (= 5.0.2)
110
- activemodel (= 5.0.2)
111
- activerecord (= 5.0.2)
112
- activesupport (= 5.0.2)
113
- bundler (>= 1.3.0, < 2.0)
114
- railties (= 5.0.2)
115
- sprockets-rails (>= 2.0.0)
116
- rails-dom-testing (2.0.2)
117
- activesupport (>= 4.2.0, < 6.0)
118
- nokogiri (~> 1.6)
119
- rails-html-sanitizer (1.0.3)
120
- loofah (~> 2.0)
121
- railties (5.0.2)
122
- actionpack (= 5.0.2)
123
- activesupport (= 5.0.2)
124
- method_source
125
- rake (>= 0.8.7)
126
- thor (>= 0.18.1, < 2.0)
127
- rake (12.0.0)
128
- sass (3.4.23)
129
- sass-rails (5.0.6)
130
- railties (>= 4.0.0, < 6)
131
- sass (~> 3.1)
132
- sprockets (>= 2.8, < 4.0)
133
- sprockets-rails (>= 2.0, < 4.0)
134
- tilt (>= 1.1, < 3)
135
- selectize-rails (0.12.4)
136
- sprockets (3.7.1)
137
- concurrent-ruby (~> 1.0)
138
- rack (> 1, < 3)
139
- sprockets-rails (3.2.0)
140
- actionpack (>= 4.0)
141
- activesupport (>= 4.0)
142
- sprockets (>= 3.0.0)
143
- thor (0.19.4)
144
- thread_safe (0.3.6)
145
- tilt (2.0.7)
146
- tzinfo (1.2.2)
147
- thread_safe (~> 0.1)
148
- websocket-driver (0.6.5)
149
- websocket-extensions (>= 0.1.0)
150
- websocket-extensions (0.1.2)
151
-
152
- PLATFORMS
153
- ruby
154
-
155
- DEPENDENCIES
156
- administrate-field-state_machine!
157
-
158
- BUNDLED WITH
159
- 1.14.6