harbourmaster 0.2.4 → 0.2.5

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: 7ccb161aaf89ebc835fd5dfbda2ac31f92d0159e
4
- data.tar.gz: 65dd1bae06b506daf71cf441e4285dc63dc7ae3d
3
+ metadata.gz: 3b53ca3f654aa0dcea4a02193381057588572c61
4
+ data.tar.gz: ecb585eb7268eb1b99286fb365ab1f570c8456b8
5
5
  SHA512:
6
- metadata.gz: def806a2567c3c5f3150a847d0758568b8aaabb4eeea42309095671ed57c63f90fdb99f9d58f7159f3d2a5dc35de95ca346e7cdd7629a44d6d23adf8404369d2
7
- data.tar.gz: e50086a1eaac47751136c8cb30328d64865dfe3a00c24d4f36c3459fd7d9c2e9b835acd60a48efed1fc963122d4cee45d2592f22e36b12151069ff50ee9a03e6
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 permitted_params
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"
@@ -1,3 +1,3 @@
1
1
  module Harbourmaster
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
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
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-01 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails