active_admin_datetimepicker 0.3.0 → 0.4.0

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: 3c72994cf304845543c3f319e23c9698a15e2b11
4
- data.tar.gz: 0eaa09e22b51c4bf56b17a2e79b9192ca047a57d
3
+ metadata.gz: 8b9c9dd279a37c84c6094dbe03dbc54dc398fdb7
4
+ data.tar.gz: d94c5298dad442e98ec8752c2cf34e5ac88c33d9
5
5
  SHA512:
6
- metadata.gz: 954507593866cc6712c01c93c4f3a54f1a43f8c8d20444dc40a6618713e4acfd0f4c25dfab257e5d282b4b14e3def696f38d2bb06e06b1fcf9109f18cc587a21
7
- data.tar.gz: ee73901e2f85833161a6aa6690ad75d5fc49bac1f3e2c8836db03f457ac8770448e3f93e0e90d2f948fa6ab68a18856f074ccfa8946371db4ba98a1d12596288
6
+ metadata.gz: 7015872e440007cfceb06e98f20cb6fad15c16778ee2a116229d0562b7a52a07e0c30f89350a8ad1ecdb4b5d0f2da980538211e1f198544811812baa0939c228
7
+ data.tar.gz: 81dfcdc362abed2d40b4c06471eeaf9d1ad3f957364126cdca60bbdb4713b6f5e081bded3cac66e7e5762a699c06975425cd17e5cc513bc84a958b8331446358
data/.travis.yml CHANGED
@@ -1,14 +1,13 @@
1
1
  script: bundle exec rspec spec
2
2
  env:
3
3
  matrix:
4
- - RAILS=4.0.13
5
- - RAILS=4.1.5
6
4
  - RAILS=4.2.6
5
+ - RAILS=5.0.0
7
6
  rvm:
8
- - 2.1.5
9
- - 2.2.0
10
- - 2.3.0
7
+ - 2.2.6
8
+ - 2.3.3
11
9
  before_install:
12
- - gem install bundler -v '= 1.9.3'
13
10
  - gem update --system
11
+ - rvm @global do gem uninstall bundler -a -x
12
+ - rvm @global do gem install bundler -v 1.14.6
14
13
  - gem --version
data/Gemfile CHANGED
@@ -3,11 +3,11 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in active_admin_datetimepicker.gemspec
4
4
  gemspec
5
5
  group :test do
6
- default_rails_version = '4.2.6'
6
+ default_rails_version = '4.2.7'
7
7
  gem 'sprockets-rails', '2.3.3'
8
8
  gem 'rails', "#{ENV['RAILS'] || default_rails_version}"
9
9
  gem 'rspec-rails'
10
- gem 'activeadmin', github: 'activeadmin' , ref: 'd787029e5523be2eb2ed99816eb0cecca2b72862'
10
+ gem 'activeadmin', github: 'activeadmin', ref: '06aa8b2af692e46fc360832473ca63e23a70b3d4'
11
11
  gem 'coveralls', require: false # Test coverage website. Go to https://coveralls.io
12
12
  gem 'sass-rails'
13
13
  gem 'sqlite3'
data/README.md CHANGED
@@ -57,15 +57,22 @@ ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
57
57
  ActiveAdminDatetimepicker::Base.format = "%Y-%m-%d %H:%M:%S"
58
58
  ```
59
59
 
60
+ ## Change datetime format
61
+ If you want to change format - you need to make sure that front-end and back-end formats are identical. And remember JS and Ruby datetime format has different syntax.
60
62
 
61
- See [the datetimepicker documentation for more details](http://xdsoft.net/jqplugins/datetimepicker/).
62
-
63
+ Create configuration file '/config/initializers/init_datetimpicker.rb'
63
64
 
64
- ## Development
65
+ ```ruby
66
+ # Example "11/03/2016 13:00"
67
+ ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
68
+ format: 'd/m/Y H:i', # JS format
69
+ defaultTime: proc { Time.current.strftime('%H:00') } # not necessary
70
+ }
71
+ ActiveAdminDatetimepicker::Base.format = "%d/%m/%Y %H:%M" # Ruby format
72
+ ```
65
73
 
66
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
74
+ See [the datetimepicker documentation for more details](http://xdsoft.net/jqplugins/datetimepicker/).
67
75
 
68
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
69
76
 
70
77
  ## Contributing
71
78
 
@@ -14,7 +14,7 @@
14
14
  options = $(entry).data 'datepicker-options'
15
15
  $(entry).datetimepicker $.extend(defaults, options)
16
16
 
17
- $ ->
17
+ $(document).on 'ready turbolinks:load', ->
18
18
  setupDateTimePicker $('body')
19
19
  $(document).on 'has_many_add:after', '.has_many_container', (e, fieldset) ->
20
- setupDateTimePicker fieldset
20
+ setupDateTimePicker fieldset
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminDatetimepicker
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_datetimepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Fedoronchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xdan-datetimepicker-rails
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.4.6
98
+ rubygems_version: 2.6.10
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: datetimepicker extension for ActiveAdmin