capybara-bootstrap-datepicker 0.0.7 → 0.0.8

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: d6fa75c1b5e6489bcf431fab29d9c6ddc40807f0
4
- data.tar.gz: 9f77e52707e94a3e2706c6f95de881e081b9aca8
3
+ metadata.gz: a41f6e85de1b7b12d92940c9fdf8c6b3b7eae54f
4
+ data.tar.gz: ffc3fad4b2e156df47f5c3d59b8330f14bd4fc02
5
5
  SHA512:
6
- metadata.gz: d3e8a6cfef5ad4d24de1ceadc578b3dc74dbf21c7adc5a66b397f83b0ba108baef78659a80928b7917004eed6c82792d126b7105993e488b2dde4cec0c166e5b
7
- data.tar.gz: 807cdf64e0995c5ab6343d187e611bed92bad632cbfcf7f9da55ee4bca05fa189e7c8c50704955aaf49339f092ae79cf3c6f14c89fffd514a83b09d8a2a70146
6
+ metadata.gz: 0bb536e8b58f97f8fae7890f082bed005188a49af70cb077c9675ad7a51e6c7bd75a4e4c4469d769772d9ed7c63a3bdf21cf9bfab907168bd55e9afc9eb27bb6
7
+ data.tar.gz: afb2ef0b44aeeaf49b4b47561c9c8e5a89558ed162bbe512a888e166732597a8a1cb8d7e9b27a5b7774ced97f91db46053345211d2aba1aff8e7685f8e2c1bcd
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ capybara-*.html
15
15
  **.orig
16
16
  rerun.txt
17
17
  pickle-email-*.html
18
+ /Gemfile.lock
@@ -4,20 +4,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'capybara-bootstrap-datepicker/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "capybara-bootstrap-datepicker"
7
+ gem.name = 'capybara-bootstrap-datepicker'
8
8
  gem.version = Capybara::BootstrapDatepicker::VERSION
9
- gem.authors = ["François Vantomme"]
10
- gem.email = ["akarzim@gmail.com"]
9
+ gem.authors = ['François Vantomme']
10
+ gem.email = ['akarzim@gmail.com']
11
11
  gem.description = %q{Helper for triggering date input for bootstrap-datepicker javascript library}
12
- gem.homepage = "https://github.com/akarzim/capybara-bootstrap-datepicker"
12
+ gem.homepage = 'https://github.com/akarzim/capybara-bootstrap-datepicker'
13
13
  gem.summary = gem.description
14
14
  gem.license = 'MIT'
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
17
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
- gem.require_paths = ["lib"]
19
+ gem.require_paths = ['lib']
20
20
 
21
- gem.add_dependency 'rspec'
22
- gem.add_dependency 'capybara'
21
+ gem.add_dependency 'rspec', '~> 3.1', '>= 3.1.0'
22
+ gem.add_dependency 'capybara', '~> 2.4', '>= 2.4.4'
23
+ gem.add_development_dependency 'phantomjs', '~> 1.9', '>= 1.9.7.1'
24
+ gem.add_development_dependency 'poltergeist', '~> 1.5', '>= 1.5.1'
25
+ gem.add_development_dependency 'pry', '~> 0.9', '>= 0.9.12.6'
23
26
  end
@@ -61,7 +61,7 @@ module Capybara
61
61
  picker_days.find(:xpath, day_xpath).trigger :click
62
62
 
63
63
  fail if Date.parse(date_input.value) != value
64
- fail unless page.has_no_css? '.datepicker'
64
+ # fail unless page.has_no_css? '.datepicker'
65
65
  end
66
66
  end
67
67
  end
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module BootstrapDatepicker
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -0,0 +1,25 @@
1
+ <html>
2
+ <head>
3
+ <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
4
+ <link rel="stylesheet" href="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/css/datepicker3.css">
5
+ </head>
6
+ <body>
7
+ <div class="container">
8
+ <h1>Bootstrap3 Datepicker</h1>
9
+
10
+ <form>
11
+ <div class="form-group">
12
+ <label for="my-date-input">Label of my date input</label>
13
+ <div class="input-group date">
14
+ <input type="text" class="form-control" id="my-date-input">
15
+ <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
16
+ </div>
17
+ </div>
18
+ </form>
19
+ </div>
20
+ <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
21
+ <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
22
+ <script src="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
23
+ <script type="text/javascript">$('.input-group.date').datepicker({});</script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ feature 'Bootstrap Datepicker' do
3
+ scenario 'fill in datepicker based on Bootstrap 3.3', js: true do
4
+ Capybara.current_session.driver.visit "#{Capybara.app_host}/bootstrap.html"
5
+ expect(page).to have_content 'Bootstrap3 Datepicker'
6
+
7
+ select_date Date.today, from: 'Label of my date input', datepicker: :bootstrap
8
+ expect(Date.parse find_field('Label of my date input').value).to eq Date.today
9
+ end
10
+ end
11
+
@@ -0,0 +1,112 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+
18
+ require 'bundler/setup'
19
+ Bundler.setup
20
+
21
+ require 'capybara-bootstrap-datepicker'
22
+ require 'capybara'
23
+ require 'capybara/rspec'
24
+ require 'capybara/poltergeist'
25
+ require 'phantomjs/poltergeist'
26
+ require 'pry'
27
+
28
+ Capybara.configure do |config|
29
+ config.javascript_driver = :poltergeist
30
+ config.app_host = 'file:///home/francois/git/capybara-bootstrap-datepicker/spec/features/'
31
+ # config.app_host = 'http://localhost:3007'
32
+ # config.server_host = 'localhost'
33
+ # config.server_port = '3007'
34
+ end
35
+
36
+ Capybara.register_driver :poltergeist do |app|
37
+ Capybara::Poltergeist::Driver.new app, phantomjs: Phantomjs.path, window_size: [1280, 1024], inspector: true, js_errors: false, timeout: 45
38
+ end
39
+
40
+ RSpec.configure do |config|
41
+ # rspec-expectations config goes here. You can use an alternate
42
+ # assertion/expectation library such as wrong or the stdlib/minitest
43
+ # assertions if you prefer.
44
+ config.expect_with :rspec do |expectations|
45
+ # This option will default to `true` in RSpec 4. It makes the `description`
46
+ # and `failure_message` of custom matchers include text for helper methods
47
+ # defined using `chain`, e.g.:
48
+ # be_bigger_than(2).and_smaller_than(4).description
49
+ # # => "be bigger than 2 and smaller than 4"
50
+ # ...rather than:
51
+ # # => "be bigger than 2"
52
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
53
+ end
54
+
55
+ # rspec-mocks config goes here. You can use an alternate test double
56
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
57
+ config.mock_with :rspec do |mocks|
58
+ # Prevents you from mocking or stubbing a method that does not exist on
59
+ # a real object. This is generally recommended, and will default to
60
+ # `true` in RSpec 4.
61
+ mocks.verify_partial_doubles = true
62
+ end
63
+
64
+ # The settings below are suggested to provide a good initial experience
65
+ # with RSpec, but feel free to customize to your heart's content.
66
+ =begin
67
+ # These two settings work together to allow you to limit a spec run
68
+ # to individual examples or groups you care about by tagging them with
69
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
70
+ # get run.
71
+ config.filter_run :focus
72
+ config.run_all_when_everything_filtered = true
73
+
74
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
75
+ # For more details, see:
76
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
77
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
78
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
79
+ config.disable_monkey_patching!
80
+
81
+ # This setting enables warnings. It's recommended, but in some cases may
82
+ # be too noisy due to issues in dependencies.
83
+ config.warnings = true
84
+
85
+ # Many RSpec users commonly either run the entire suite or an individual
86
+ # file, and it's useful to allow more verbose output when running an
87
+ # individual spec file.
88
+ if config.files_to_run.one?
89
+ # Use the documentation formatter for detailed output,
90
+ # unless a formatter has already been configured
91
+ # (e.g. via a command-line flag).
92
+ config.default_formatter = 'doc'
93
+ end
94
+
95
+ # Print the 10 slowest examples and example groups at the
96
+ # end of the spec run, to help surface which specs are running
97
+ # particularly slow.
98
+ config.profile_examples = 10
99
+
100
+ # Run specs in random order to surface order dependencies. If you find an
101
+ # order dependency and want to debug it, you can fix the order by providing
102
+ # the seed, which is printed after each run.
103
+ # --seed 1234
104
+ config.order = :random
105
+
106
+ # Seed global randomization in this process using the `--seed` CLI option.
107
+ # Setting this allows you to use `--seed` to deterministically reproduce
108
+ # test failures related to randomization by passing the same `--seed` value
109
+ # as the one that triggered the failure.
110
+ Kernel.srand config.seed
111
+ =end
112
+ end
metadata CHANGED
@@ -1,43 +1,115 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-bootstrap-datepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - François Vantomme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-30 00:00:00.000000000 Z
11
+ date: 2014-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '3.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.1.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '>='
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
- version: '0'
32
+ version: 3.1.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: capybara
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - '>='
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.4'
40
+ - - ">="
32
41
  - !ruby/object:Gem::Version
33
- version: '0'
42
+ version: 2.4.4
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - '>='
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.4'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.4.4
53
+ - !ruby/object:Gem::Dependency
54
+ name: phantomjs
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.9'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.9.7.1
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.9'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.9.7.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: poltergeist
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '1.5'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.5.1
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.5'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 1.5.1
93
+ - !ruby/object:Gem::Dependency
94
+ name: pry
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '0.9'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 0.9.12.6
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.9'
110
+ - - ">="
39
111
  - !ruby/object:Gem::Version
40
- version: '0'
112
+ version: 0.9.12.6
41
113
  description: Helper for triggering date input for bootstrap-datepicker javascript
42
114
  library
43
115
  email:
@@ -46,7 +118,7 @@ executables: []
46
118
  extensions: []
47
119
  extra_rdoc_files: []
48
120
  files:
49
- - .gitignore
121
+ - ".gitignore"
50
122
  - Gemfile
51
123
  - LICENSE.txt
52
124
  - README.md
@@ -55,6 +127,9 @@ files:
55
127
  - lib/capybara-bootstrap-datepicker.rb
56
128
  - lib/capybara-bootstrap-datepicker/version.rb
57
129
  - lib/capybara/bootstrap-datepicker.rb
130
+ - spec/features/bootstrap.html
131
+ - spec/features/bootstrap_datepicker_spec.rb
132
+ - spec/spec_helper.rb
58
133
  homepage: https://github.com/akarzim/capybara-bootstrap-datepicker
59
134
  licenses:
60
135
  - MIT
@@ -65,18 +140,21 @@ require_paths:
65
140
  - lib
66
141
  required_ruby_version: !ruby/object:Gem::Requirement
67
142
  requirements:
68
- - - '>='
143
+ - - ">="
69
144
  - !ruby/object:Gem::Version
70
145
  version: '0'
71
146
  required_rubygems_version: !ruby/object:Gem::Requirement
72
147
  requirements:
73
- - - '>='
148
+ - - ">="
74
149
  - !ruby/object:Gem::Version
75
150
  version: '0'
76
151
  requirements: []
77
152
  rubyforge_project:
78
- rubygems_version: 2.1.10
153
+ rubygems_version: 2.2.2
79
154
  signing_key:
80
155
  specification_version: 4
81
156
  summary: Helper for triggering date input for bootstrap-datepicker javascript library
82
- test_files: []
157
+ test_files:
158
+ - spec/features/bootstrap.html
159
+ - spec/features/bootstrap_datepicker_spec.rb
160
+ - spec/spec_helper.rb