railman 1.0.2 → 1.0.3

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: 38d5c932eb8a31783cee7083b7eaec8e760afec4
4
- data.tar.gz: 6ea6dad077ce58b5de977322c0d6b3db7c31d77f
3
+ metadata.gz: 1ad53e4de95bb9ed21f9b56e29ace540fee80e01
4
+ data.tar.gz: 5498e4f2b9f2641e2e3b63d2814e54eaa6777142
5
5
  SHA512:
6
- metadata.gz: f4c1666bae7a2b97e963cddebb2bb9723300549ef18d2ab311e7c814c7ec944b2c2f933c2f6d8aa04956e2940136e4851f83b8feb0d11c80c5a82bd354036caa
7
- data.tar.gz: debc8db5fac7bacd0e94ef66f427c9f74e91010bf8170384bad22dbafb95c209da1a9bb51c23dc868db80c39d1949f165fe3e6a6b7d67703527376c7bd10a99d
6
+ metadata.gz: 707029743cf3e7577e453d4ef907cbf2476028d48d5b52532cd087be4532341b8c0a340fac003a14a33f720ada43a0dd8f760d7a19d4663d85b3cf4faa07e606
7
+ data.tar.gz: 2151fe1ac07acfcf695d4ab8a5bcfea5918b7eb24b72f696d7f4479654e986c4d00d2e98894ea1f0793740d50621ecfc7c45837a0bf3968194c2bfa67cf2649f
@@ -97,11 +97,13 @@ module Railman
97
97
  remove_file "#{@config.app_name}/bin/unicorn_rails"
98
98
  remove_file "#{@config.app_name}/app/jobs/.keep"
99
99
  remove_file "#{@config.app_name}/app/models/.keep"
100
+ remove_file "#{@config.app_name}/test/webtest_helper.rb"
100
101
  remove_dir "#{@config.app_name}/vendor/assets"
101
102
  end
102
103
  save_config(@config)
103
104
  Dir.chdir @config.app_name do
104
105
  run "bundle update"
106
+ run "yarn install"
105
107
  run "chmod +x bin/*"
106
108
  if create
107
109
  create_local_git_repository
@@ -1,3 +1,3 @@
1
1
  module Railman
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -13,7 +13,7 @@ gem 'pg', '0.18.2'
13
13
 
14
14
  gem 'semantic-rails-ui' # semantic-ui + simple_form + rails helpers
15
15
 
16
- gem 'webpacker', github: 'rails/webpacker'
16
+ gem 'webpacker', '1.0.0'
17
17
 
18
18
  gem 'hiredis', '0.6.1'
19
19
  gem 'redis', '3.3.1', require: %w(redis redis/connection/hiredis)
@@ -47,14 +47,11 @@ end
47
47
 
48
48
  group :test do
49
49
  gem 'minitest-reporters', '1.1.7' # generate xml for jenkins
50
- gem 'minitest-screenshot-reporter', '0.0.2' # generate screenshots on capybara errors
51
50
  gem 'simplecov', require: false # generate coverage reports
52
51
  gem 'simplecov-rcov', '0.2.3', require: false # generate coverage reports for jenkins
53
52
  gem 'capybara', '2.12.1' # dsl for browser tests
54
- gem 'capybara_minitest_spec', '1.0.5' # capybara rspec-style matchers (must_have...)
55
53
  gem 'selenium-webdriver', '3.2.2' # use real browser for webtests
56
54
  gem 'poltergeist', '1.8.1' # headless tests with phantom.js
57
- gem 'database_cleaner', '1.5.2' # cleanup test database after every integration test
58
55
  end
59
56
 
60
57
  # put additional application-specific gems to Gemfile.local
@@ -1,5 +1,9 @@
1
1
  require "test_helper"
2
+ require "capybara/poltergeist"
2
3
 
3
4
  class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
- driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ driven_by :poltergeist
6
+ #driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
7
+
8
+ fixtures :all
5
9
  end
@@ -0,0 +1,8 @@
1
+ require 'application_system_test_case'
2
+
3
+ class HomepageTest < ApplicationSystemTestCase
4
+ test 'homepage' do
5
+ visit '/'
6
+ assert_text 'Welcome to <%= @config.class_name %> :-)'
7
+ end
8
+ end
@@ -7,10 +7,9 @@ require 'rails/test_help'
7
7
 
8
8
  # use minitest-reporters to create xmls for jenkins and nicer terminal reporting
9
9
  require 'minitest/reporters'
10
- require 'minitest/reporters/screenshot_reporter'
10
+
11
11
  Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new,
12
- Minitest::Reporters::JUnitReporter.new,
13
- Minitest::Reporters::ScreenshotReporter.new]
12
+ Minitest::Reporters::JUnitReporter.new]
14
13
 
15
14
  # default test class for unit tests
16
15
  class UnitTest < ActiveSupport::TestCase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-05 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -272,12 +272,10 @@ files:
272
272
  - templates/rails_app/test/fixtures/.keep
273
273
  - templates/rails_app/test/helpers/.keep
274
274
  - templates/rails_app/test/integration/.keep
275
- - templates/rails_app/test/integration/homepage_test.rb.tt
276
275
  - templates/rails_app/test/mailers/.keep
277
276
  - templates/rails_app/test/models/.keep
278
- - templates/rails_app/test/system/.keep
277
+ - templates/rails_app/test/system/homepage_test.rb.tt
279
278
  - templates/rails_app/test/test_helper.rb
280
- - templates/rails_app/test/webtest_helper.rb
281
279
  - templates/rails_app/vendor/.keep
282
280
  homepage: https://github.com/igorj/railman
283
281
  licenses:
@@ -1,9 +0,0 @@
1
- require 'webtest_helper'
2
-
3
- class HomepageTest < WebTest
4
- test 'homepage' do
5
- visit '/'
6
- screenshot 'homepage'
7
- must_have_content 'Welcome to <%= @config.class_name %> :-)'
8
- end
9
- end
File without changes
@@ -1,60 +0,0 @@
1
- require 'simplecov' if ENV['COVERAGE'] == 'true'
2
-
3
- # default rails test configuration
4
- ENV['RAILS_ENV'] ||= 'test'
5
- require File.expand_path('../../config/environment', __FILE__)
6
- require 'rails/test_help'
7
-
8
- # use minitest-reporters to create xmls for jenkins and nicer terminal reporting
9
- require 'minitest/reporters'
10
- require 'minitest/reporters/screenshot_reporter'
11
- Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new,
12
- Minitest::Reporters::JUnitReporter.new,
13
- Minitest::Reporters::ScreenshotReporter.new]
14
-
15
- # configure webtests with capybara and poltergeist (headless)
16
- require 'capybara/rails'
17
- require 'capybara_minitest_spec'
18
- require 'capybara/poltergeist'
19
-
20
- CAPYBARA_WINDOW_SIZE = [1024, 768]
21
-
22
- if ENV['HEADLESS'] == 'true'
23
- # headless driver configuration
24
- Capybara.register_driver :poltergeist do |app|
25
- poltergeist_options = { debug: false, timeout: 30, js_errors: true, window_size: CAPYBARA_WINDOW_SIZE }
26
- Capybara::Poltergeist::Driver.new(app, poltergeist_options)
27
- end
28
- Capybara.default_driver = :poltergeist
29
- else
30
- # chrome browser driver configuration
31
- Capybara.register_driver :selenium do |app|
32
- Capybara::Selenium::Driver.new(app, :browser => :chrome)
33
- end
34
- Capybara.default_driver = :selenium
35
- Capybara.current_session.driver.browser.manage.window.resize_to CAPYBARA_WINDOW_SIZE[0], CAPYBARA_WINDOW_SIZE[1]
36
- end
37
- Capybara.default_max_wait_time = 5 # how long should capybara wait for elements to appear on the page (ajax)
38
-
39
- # use database_cleaner to clean the database after every test with truncation, instead of using transactional fixtures
40
- require 'database_cleaner'
41
- DatabaseCleaner.strategy = :truncation
42
-
43
- # default test class for webtests
44
- class WebTest < ActionDispatch::IntegrationTest
45
- include Capybara::DSL
46
- extend Minitest::Spec::DSL
47
- include Minitest::Reporters::Screenshot
48
-
49
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
50
- fixtures :all
51
-
52
- # disable transactional fixtures, as we use DatabaseCleaner
53
- self.use_transactional_fixtures = false
54
-
55
- # clean database after each test with database_cleaner
56
- def after_teardown
57
- super
58
- DatabaseCleaner.clean
59
- end
60
- end