makers 4.0.0.4 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +5 -5
  4. data/Rakefile +1 -3
  5. data/lib/generators/makers/install/install_generator.rb +1 -6
  6. data/lib/makers.rb +8 -0
  7. data/lib/makers/maker.rb +1 -1
  8. data/lib/makers/railtie.rb +1 -6
  9. data/lib/makers/version.rb +1 -1
  10. metadata +13 -109
  11. data/test/dummy/Rakefile +0 -5
  12. data/test/dummy/app/assets/javascripts/application.js +0 -13
  13. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  14. data/test/dummy/app/controllers/application_controller.rb +0 -5
  15. data/test/dummy/app/helpers/application_helper.rb +0 -2
  16. data/test/dummy/app/models/post.rb +0 -5
  17. data/test/dummy/app/models/user.rb +0 -5
  18. data/test/dummy/app/views/layouts/application.html.erb +0 -12
  19. data/test/dummy/bin/bundle +0 -4
  20. data/test/dummy/bin/rails +0 -5
  21. data/test/dummy/bin/rake +0 -5
  22. data/test/dummy/bin/setup +0 -30
  23. data/test/dummy/config.ru +0 -4
  24. data/test/dummy/config/application.rb +0 -25
  25. data/test/dummy/config/boot.rb +0 -5
  26. data/test/dummy/config/database.yml +0 -10
  27. data/test/dummy/config/database.yml.travis +0 -3
  28. data/test/dummy/config/environment.rb +0 -5
  29. data/test/dummy/config/environments/development.rb +0 -41
  30. data/test/dummy/config/environments/production.rb +0 -79
  31. data/test/dummy/config/environments/test.rb +0 -42
  32. data/test/dummy/config/initializers/assets.rb +0 -11
  33. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  34. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  35. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  36. data/test/dummy/config/initializers/inflections.rb +0 -16
  37. data/test/dummy/config/initializers/mime_types.rb +0 -4
  38. data/test/dummy/config/initializers/session_store.rb +0 -3
  39. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  40. data/test/dummy/config/locales/en.yml +0 -23
  41. data/test/dummy/config/routes.rb +0 -56
  42. data/test/dummy/config/secrets.yml +0 -22
  43. data/test/dummy/db/migrate/20140613221835_create_users.rb +0 -13
  44. data/test/dummy/db/migrate/20140615180954_create_posts.rb +0 -9
  45. data/test/dummy/db/schema.rb +0 -35
  46. data/test/dummy/log/development.log +0 -114
  47. data/test/dummy/log/test.log +0 -2698
  48. data/test/dummy/public/404.html +0 -61
  49. data/test/dummy/public/422.html +0 -61
  50. data/test/dummy/public/500.html +0 -60
  51. data/test/dummy/public/favicon.ico +0 -0
  52. data/test/dummy/test/makers.rb +0 -24
  53. data/test/generator_test.rb +0 -18
  54. data/test/maker_test.rb +0 -66
  55. data/test/test_helper.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96d4fc26dc866c80ff6822133981e685cfb2fd64
4
- data.tar.gz: 60c0238d7d1e9193ad7e49809c8d2e989217f4cd
3
+ metadata.gz: 7afa90216621a8657355c147686befe2643ad98f
4
+ data.tar.gz: f6c410152257be09867c8807799bbb99eb151dde
5
5
  SHA512:
6
- metadata.gz: 55a05d0e9c88ca8594bfc92455bc4fc9dcefcc1b1fc376bc1b384e21956ebb1ccc61130ca9f549a5759998415c270fdc84fc7bff5dbbe4c4d46a389fd4227a40
7
- data.tar.gz: 6f6927eaa52c8032a5827f8112d36ca10cc668f130b721b6fd8fe37774606853c968bd857fd44ab92b1a3b9f496db8cd859a9114b794b8fc2fd9b0710c995fe4
6
+ metadata.gz: 34683394c52a0084a7b67b5f9e30099eb379baf8b818803ffff8e98ea200b4091c3f7226c91753bd697749efdd4fa668aca6979f369d812b595e651e5cc4c5ef
7
+ data.tar.gz: 52c71bb21f85d278e6f58e929f048be3beef8e2367aba6fc12e0ee9069b14cd069df3f35748aff65ab3a8a6e31160535d722cb29ea62c85da34fc8663bdcc114
@@ -1,4 +1,4 @@
1
- Copyright 2016 Mathías Montossi
1
+ Copyright 2017 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/makers.svg)](http://badge.fury.io/rb/makers)
2
- [![Code Climate](https://codeclimate.com/github/mmontossi/makers/badges/gpa.svg)](https://codeclimate.com/github/mmontossi/makers)
3
- [![Build Status](https://travis-ci.org/mmontossi/makers.svg)](https://travis-ci.org/mmontossi/makers)
4
- [![Dependency Status](https://gemnasium.com/mmontossi/makers.svg)](https://gemnasium.com/mmontossi/makers)
2
+ [![Code Climate](https://codeclimate.com/github/museways/makers/badges/gpa.svg)](https://codeclimate.com/github/museways/makers)
3
+ [![Build Status](https://travis-ci.org/museways/makers.svg)](https://travis-ci.org/museways/makers)
4
+ [![Dependency Status](https://gemnasium.com/museways/makers.svg)](https://gemnasium.com/museways/makers)
5
5
 
6
6
  # Makers
7
7
 
@@ -152,11 +152,11 @@ create :category, 5, title: 'other'
152
152
 
153
153
  Any issue, pull request, comment of any kind is more than welcome!
154
154
 
155
- I will mainly ensure compatibility to PostgreSQL, AWS, Redis, Elasticsearch, FreeBSD and Memcached
155
+ I will mainly ensure compatibility to Rails, AWS, PostgreSQL, Redis, Elasticsearch and FreeBSD
156
156
 
157
157
  ## Credits
158
158
 
159
- This gem is maintained and funded by [mmontossi](https://github.com/mmontossi).
159
+ This gem is maintained and funded by [museways](https://github.com/museways).
160
160
 
161
161
  ## License
162
162
 
data/Rakefile CHANGED
@@ -4,16 +4,14 @@ rescue LoadError
4
4
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
5
  end
6
6
 
7
- Bundler::GemHelper.install_tasks
7
+ require 'bundler/gem_tasks'
8
8
 
9
9
  require 'rake/testtask'
10
10
 
11
11
  Rake::TestTask.new(:test) do |t|
12
- t.libs << 'lib'
13
12
  t.libs << 'test'
14
13
  t.pattern = 'test/**/*_test.rb'
15
14
  t.verbose = false
16
- t.warning = false
17
15
  end
18
16
 
19
17
  task default: :test
@@ -7,12 +7,7 @@ module Makers
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
 
9
9
  def create_definitions_file
10
- if Dir.exist?(Rails.root.join('spec'))
11
- directory = 'spec'
12
- else
13
- directory = 'test'
14
- end
15
- template 'definitions.rb', "#{directory}/makers.rb"
10
+ template 'definitions.rb', "#{Makers.directory}/makers.rb"
16
11
  end
17
12
 
18
13
  end
@@ -19,6 +19,14 @@ module Makers
19
19
  @traits ||= Traits.new
20
20
  end
21
21
 
22
+ def directory
23
+ if Dir.exist?(Rails.root.join('spec'))
24
+ 'spec'
25
+ else
26
+ 'test'
27
+ end
28
+ end
29
+
22
30
  def define(&block)
23
31
  Proxy.new &block
24
32
  end
@@ -64,7 +64,7 @@ module Makers
64
64
 
65
65
  def create_one(overrides={})
66
66
  instance = build_one(overrides)
67
- instance.save
67
+ instance.save!
68
68
  instance
69
69
  end
70
70
 
@@ -13,12 +13,7 @@ module Makers
13
13
  end
14
14
 
15
15
  config.after_initialize do
16
- if Dir.exist?(Rails.root.join('spec'))
17
- directory = 'spec'
18
- else
19
- directory = 'test'
20
- end
21
- path = Rails.root.join("#{directory}/makers.rb")
16
+ path = Rails.root.join("#{Makers.directory}/makers.rb")
22
17
  if File.exist?(path)
23
18
  load path
24
19
  end
@@ -1,5 +1,5 @@
1
1
  module Makers
2
2
 
3
- VERSION = '4.0.0.4'
3
+ VERSION = '5.1.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,52 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makers
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.4
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmontossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-14 00:00:00.000000000 Z
11
+ date: 2017-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 4.2.0
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: 4.3.0
19
+ version: '5.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 4.2.0
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: 4.3.0
26
+ version: '5.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: pg
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '0.18'
33
+ version: '0.21'
40
34
  type: :development
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '0.18'
40
+ version: '0.21'
47
41
  description: Minimalistic factories to replace fixtures in rails.
48
42
  email:
49
- - mmontossi@gmail.com
43
+ - hi@museways.com
50
44
  executables: []
51
45
  extensions: []
52
46
  extra_rdoc_files: []
@@ -66,52 +60,7 @@ files:
66
60
  - lib/makers/railtie.rb
67
61
  - lib/makers/traits.rb
68
62
  - lib/makers/version.rb
69
- - test/dummy/Rakefile
70
- - test/dummy/app/assets/javascripts/application.js
71
- - test/dummy/app/assets/stylesheets/application.css
72
- - test/dummy/app/controllers/application_controller.rb
73
- - test/dummy/app/helpers/application_helper.rb
74
- - test/dummy/app/models/post.rb
75
- - test/dummy/app/models/user.rb
76
- - test/dummy/app/views/layouts/application.html.erb
77
- - test/dummy/bin/bundle
78
- - test/dummy/bin/rails
79
- - test/dummy/bin/rake
80
- - test/dummy/bin/setup
81
- - test/dummy/config.ru
82
- - test/dummy/config/application.rb
83
- - test/dummy/config/boot.rb
84
- - test/dummy/config/database.yml
85
- - test/dummy/config/database.yml.travis
86
- - test/dummy/config/environment.rb
87
- - test/dummy/config/environments/development.rb
88
- - test/dummy/config/environments/production.rb
89
- - test/dummy/config/environments/test.rb
90
- - test/dummy/config/initializers/assets.rb
91
- - test/dummy/config/initializers/backtrace_silencers.rb
92
- - test/dummy/config/initializers/cookies_serializer.rb
93
- - test/dummy/config/initializers/filter_parameter_logging.rb
94
- - test/dummy/config/initializers/inflections.rb
95
- - test/dummy/config/initializers/mime_types.rb
96
- - test/dummy/config/initializers/session_store.rb
97
- - test/dummy/config/initializers/wrap_parameters.rb
98
- - test/dummy/config/locales/en.yml
99
- - test/dummy/config/routes.rb
100
- - test/dummy/config/secrets.yml
101
- - test/dummy/db/migrate/20140613221835_create_users.rb
102
- - test/dummy/db/migrate/20140615180954_create_posts.rb
103
- - test/dummy/db/schema.rb
104
- - test/dummy/log/development.log
105
- - test/dummy/log/test.log
106
- - test/dummy/public/404.html
107
- - test/dummy/public/422.html
108
- - test/dummy/public/500.html
109
- - test/dummy/public/favicon.ico
110
- - test/dummy/test/makers.rb
111
- - test/generator_test.rb
112
- - test/maker_test.rb
113
- - test/test_helper.rb
114
- homepage: https://github.com/mmontossi/makers
63
+ homepage: https://github.com/museways/makers
115
64
  licenses:
116
65
  - MIT
117
66
  metadata: {}
@@ -123,7 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
72
  requirements:
124
73
  - - ">="
125
74
  - !ruby/object:Gem::Version
126
- version: 2.0.0
75
+ version: '0'
127
76
  required_rubygems_version: !ruby/object:Gem::Requirement
128
77
  requirements:
129
78
  - - ">="
@@ -131,53 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
80
  version: '0'
132
81
  requirements: []
133
82
  rubyforge_project:
134
- rubygems_version: 2.5.1
83
+ rubygems_version: 2.6.13
135
84
  signing_key:
136
85
  specification_version: 4
137
86
  summary: Makers for Rails
138
- test_files:
139
- - test/dummy/app/assets/javascripts/application.js
140
- - test/dummy/app/assets/stylesheets/application.css
141
- - test/dummy/app/controllers/application_controller.rb
142
- - test/dummy/app/helpers/application_helper.rb
143
- - test/dummy/app/models/post.rb
144
- - test/dummy/app/models/user.rb
145
- - test/dummy/app/views/layouts/application.html.erb
146
- - test/dummy/bin/bundle
147
- - test/dummy/bin/rails
148
- - test/dummy/bin/rake
149
- - test/dummy/bin/setup
150
- - test/dummy/config/application.rb
151
- - test/dummy/config/boot.rb
152
- - test/dummy/config/database.yml
153
- - test/dummy/config/database.yml.travis
154
- - test/dummy/config/environment.rb
155
- - test/dummy/config/environments/development.rb
156
- - test/dummy/config/environments/production.rb
157
- - test/dummy/config/environments/test.rb
158
- - test/dummy/config/initializers/assets.rb
159
- - test/dummy/config/initializers/backtrace_silencers.rb
160
- - test/dummy/config/initializers/cookies_serializer.rb
161
- - test/dummy/config/initializers/filter_parameter_logging.rb
162
- - test/dummy/config/initializers/inflections.rb
163
- - test/dummy/config/initializers/mime_types.rb
164
- - test/dummy/config/initializers/session_store.rb
165
- - test/dummy/config/initializers/wrap_parameters.rb
166
- - test/dummy/config/locales/en.yml
167
- - test/dummy/config/routes.rb
168
- - test/dummy/config/secrets.yml
169
- - test/dummy/config.ru
170
- - test/dummy/db/migrate/20140613221835_create_users.rb
171
- - test/dummy/db/migrate/20140615180954_create_posts.rb
172
- - test/dummy/db/schema.rb
173
- - test/dummy/log/development.log
174
- - test/dummy/log/test.log
175
- - test/dummy/public/404.html
176
- - test/dummy/public/422.html
177
- - test/dummy/public/500.html
178
- - test/dummy/public/favicon.ico
179
- - test/dummy/Rakefile
180
- - test/dummy/test/makers.rb
181
- - test/generator_test.rb
182
- - test/maker_test.rb
183
- - test/test_helper.rb
87
+ test_files: []
@@ -1,5 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
- Rails.application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,5 +0,0 @@
1
- class Post < ActiveRecord::Base
2
-
3
- belongs_to :user
4
-
5
- end
@@ -1,5 +0,0 @@
1
- class User < ActiveRecord::Base
2
-
3
- has_many :posts
4
-
5
- end
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
- <%= yield %>
11
- </body>
12
- </html>
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
4
- load Gem.bin_path('bundler', 'bundle')
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- APP_PATH = File.expand_path('../../config/application', __FILE__)
4
- require_relative '../config/boot'
5
- require 'rails/commands'
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative '../config/boot'
4
- require 'rake'
5
- Rake.application.run
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pathname'
4
-
5
- # path to your application root.
6
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
7
-
8
- Dir.chdir APP_ROOT do
9
- # This script is a starting point to setup your application.
10
- # Add necessary setup steps to this file:
11
-
12
- puts '== Installing dependencies =='
13
- system 'gem install bundler --conservative'
14
- system 'bundle check || bundle install'
15
-
16
- # puts "\n== Copying sample files =="
17
- # unless File.exist?('config/database.yml')
18
- # system 'cp config/database.yml.sample config/database.yml'
19
- # end
20
-
21
- puts "\n== Preparing database =="
22
- system 'bin/rake db:setup'
23
-
24
- puts "\n== Removing old logs and tempfiles =="
25
- system 'rm -f log/*'
26
- system 'rm -rf tmp/cache'
27
-
28
- puts "\n== Restarting application server =="
29
- system 'touch tmp/restart.txt'
30
- end
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
@@ -1,25 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require 'makers'
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
-
22
- # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
24
- end
25
- end