harbourmaster 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/harbourmaster/controller/templates/controller.rb +1 -1
- data/lib/generators/harbourmaster/install/install_generator.rb +14 -0
- data/lib/generators/harbourmaster/install/templates/rspec_api_documentation.rb +1 -1
- data/lib/harbourmaster/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b53ca3f654aa0dcea4a02193381057588572c61
|
4
|
+
data.tar.gz: ecb585eb7268eb1b99286fb365ab1f570c8456b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3895a6660eb66c2d5fb4d564714c73ac0bc7c2ef525353baf01d5d4c254737e8bd9b31e9a0eb47cbfb61b382748573ae19c5eadc358881aa7a2ec49ea86e1f41
|
7
|
+
data.tar.gz: f902079f5ab6cc29834b731d830ccccae1246fe0bb58eb9e227d9a0cbd2ca5130294a1641c089d6ac67c52ec5470a302a792f37d8f24889975afcffd30ec0b80
|
@@ -10,7 +10,7 @@ class <%= ("#{api_base_route}/#{plural_name}".split('/') - ['app', 'controllers'
|
|
10
10
|
|
11
11
|
private
|
12
12
|
|
13
|
-
def
|
13
|
+
def <%= name.underscore -%>_params
|
14
14
|
params.require(:<%= name.underscore -%>).permit(:<%= (class_name.constantize.new.attribute_names - ["created_at", "updated_at"]).join(', :') %>)
|
15
15
|
end
|
16
16
|
<% end -%>
|
@@ -23,5 +23,19 @@ module Harbourmaster
|
|
23
23
|
def initialize_apitome
|
24
24
|
generate "apitome:install"
|
25
25
|
end
|
26
|
+
|
27
|
+
def use_factory_girl_syntax
|
28
|
+
# Remove these two lines if they're already there
|
29
|
+
gsub_file 'spec/rails_helper.rb', /^\s\# Use FactoryGirl shortcuts/, ""
|
30
|
+
gsub_file 'spec/rails_helper.rb', /\s*config.include FactoryGirl::Syntax::Methods\s*/, ""
|
31
|
+
# Then add them so we know that they are there
|
32
|
+
inject_into_file 'spec/rails_helper.rb', after: /RSpec.configure do\s*.*\n/ do
|
33
|
+
<<-RUBY
|
34
|
+
# Use FactoryGirl shortcuts
|
35
|
+
config.include FactoryGirl::Syntax::Methods
|
36
|
+
|
37
|
+
RUBY
|
38
|
+
end
|
39
|
+
end
|
26
40
|
end
|
27
41
|
end
|
@@ -43,7 +43,7 @@ RspecApiDocumentation.configure do |config|
|
|
43
43
|
|
44
44
|
# Redefine what method the DSL thinks is the client
|
45
45
|
# This is useful if you need to `let` your own client, most likely a model.
|
46
|
-
config.client_method = :client
|
46
|
+
# config.client_method = :client
|
47
47
|
|
48
48
|
# Change the IODocs writer protocol
|
49
49
|
config.io_docs_protocol = "http"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harbourmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Norman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|