activetrail 0.1.0 → 0.1.1

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: 25058789a37a673f937a832820bd19ecd6d1743a
4
- data.tar.gz: b2c2759331232f67607a82fe217c2050dcc24538
3
+ metadata.gz: 4bd58309e9f5d72d377ef69b91b5854146de8648
4
+ data.tar.gz: 3cac90806b9ebd65fa3c56fc87125bd3485efd5f
5
5
  SHA512:
6
- metadata.gz: 585998f17594b47c9d69ca711f061e0585669acea9c1193ec0455e1f0c97797ccf39eda8b21acd7983aea724a5d43e274eaa263586cf3e3dce4845cb4fed5329
7
- data.tar.gz: 261cabf1f7d542734669154989e2c2ac451345957eca4ab57a54594ad1b186f06a199f0323db5ac0f0ff267293d7bb26d81b9e2a88df17ad2911fa8e99eb5bc4
6
+ metadata.gz: c46939681b533686770a23f92b204597fc933f47d5289bc009ecb1d26140c46d40ca45ab58bb4b5ab258c5572b3d83b346ef808a2dee52586dfa42b8781d62a8
7
+ data.tar.gz: 3bd096e7e96d62559e2eea681cc4edbb6baaaa2a223fa3530cdc34f63d1ecf1f281af772501d13ea6d04f4bc0fb9160eba430a30a372716dd814406a411a3410
@@ -0,0 +1,7 @@
1
+ MetricFu::Configuration.run do |config|
2
+ config.configure_metric(:rcov) do |rcov|
3
+ rcov.coverage_file = MetricFu.run_path.join("coverage/rcov/rcov.txt")
4
+ rcov.enable
5
+ rcov.activate
6
+ end
7
+ end
data/README.md CHANGED
@@ -5,6 +5,28 @@
5
5
 
6
6
  Provides integration between ActiveAdmin and Trailblazer, cool hun?!
7
7
 
8
+ ## Disclaimer
9
+
10
+ This is a BETA piece of software, please, don't use in production (yet)!
11
+
12
+ It won't work until some PRs got merged on upstream repos:
13
+
14
+ - [ ] Formtastic (Discover fields on a form object not just ActiveRecord) https://github.com/justinfrench/formtastic/pull/1142
15
+ - [ ] Reform (Expose contract fields) https://github.com/apotonick/reform/pull/212
16
+ - [ ] Trailblazer (Feature: Add operation collection) https://github.com/apotonick/trailblazer/pull/36
17
+ - [ ] Trailblazer (Feature: Add pagination and scope to collection) https://github.com/apotonick/trailblazer/pull/39
18
+ - [ ] Bonus! Trailblazer (Feature: Add authorization) https://github.com/apotonick/trailblazer/pull/41
19
+
20
+ In meanwhile you can use my forks:
21
+
22
+ ```ruby
23
+ gem "trailblazer", github: "fernandes/trailblazer", branch: "master"
24
+ gem "reform", github: "fernandes/reform", branch: "feature/expose_contract_fields"
25
+ gem "formtastic", github: "fernandes/formtastic", branch: "feature/get_fields_from_form_object"
26
+ ```
27
+
28
+ I'm keeping my branches even with upstream's util everything is ok.
29
+
8
30
  ## Installation
9
31
 
10
32
  Add this line to your application's Gemfile:
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["fernandes@zertico.com"]
11
11
 
12
12
  spec.summary = %q{Integration between ActiveAdmin and Trailblazer}
13
- spec.description = %q{Provide a cool, and seamless, integration between ActiveAdmin and Trailblazer, so you can you your operations inside ActiveAdmin}
13
+ spec.description = %q{Provide a cool, and seamless, integration between ActiveAdmin and Trailblazer, so you can use your operations inside ActiveAdmin}
14
14
  spec.homepage = "https://github.com/fernandes/activetrail"
15
15
  spec.license = "MIT"
16
16
 
@@ -27,4 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rspec-rails", "~> 3.0"
28
28
  spec.add_development_dependency "sqlite3", "~> 1.3"
29
29
  spec.add_development_dependency "trailblazer", "~> 0.2"
30
+ spec.add_development_dependency "metric_fu"
31
+ spec.add_development_dependency "simplecov"
30
32
  end
@@ -3,10 +3,20 @@ module ActiveTrail
3
3
  def self.included(base)
4
4
  if base.instance_methods.include?(:collection)
5
5
  Trailblazer::Operation::Controller.instance_eval do
6
- # As activeadmin has a collection controller method we remove it
7
- # so we don't override original method and use `trb_collection`
8
- alias_method :trb_collection, :collection
9
- remove_method :collection
6
+ begin
7
+ # As activeadmin has a collection controller method we remove it
8
+ # so we don't override original method and use `trb_collection`
9
+ # unless respond_to?(:trb_collection)
10
+ alias_method :trb_collection, :collection
11
+ remove_method :collection
12
+ rescue NameError
13
+ # So you're doing a null rescue here, do you like it? NO!
14
+ # But every modification on a AA related class, this class is reloaded
15
+ # and was trying make the alias_method and raise this exception
16
+ # don't know if its a rails issue, or my code issue
17
+ # if someone knows how to fix without this (unpolite) nil rescue
18
+ # please open an issue / PR
19
+ end
10
20
  end
11
21
  base.include Trailblazer::Operation::Controller
12
22
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveTrail
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activetrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Celso Fernandes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-03-28 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codeclimate-test-reporter
@@ -122,8 +122,36 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: metric_fu
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
125
153
  description: Provide a cool, and seamless, integration between ActiveAdmin and Trailblazer,
126
- so you can you your operations inside ActiveAdmin
154
+ so you can use your operations inside ActiveAdmin
127
155
  email:
128
156
  - fernandes@zertico.com
129
157
  executables: []
@@ -131,6 +159,7 @@ extensions: []
131
159
  extra_rdoc_files: []
132
160
  files:
133
161
  - ".gitignore"
162
+ - ".metrics"
134
163
  - ".rspec"
135
164
  - ".travis.yml"
136
165
  - Gemfile