jquery_indonesia_regions_rails 0.1.0
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README.md +39 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/jquery_indonesia_regions_rails.gemspec +31 -0
- data/lib/jquery_indonesia_regions_rails/version.rb +3 -0
- data/lib/jquery_indonesia_regions_rails.rb +6 -0
- data/vendor/assets/javascripts/jquery-indonesia-regions.js +47 -0
- metadata +99 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: ef7fb7d10dcd3b46f1feb8d3e908c9134d54d094
|
|
4
|
+
data.tar.gz: 5614cdfed67227542680ccc768a39a53c8c3b31d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: cc27aa6fd35ebb46b4baad6ba8837a003d7fa934186571c6f2369800f1cbd22fc66fe8e5cffdc082c8b946aa3c12cad5f78a07b8259f431d6d662f6b06b54610
|
|
7
|
+
data.tar.gz: fb55f1f0392d7b0c8eece866338e78cba3c90ca7d98a9c6d3aedfa7c8908c9d9f577ddb970d8e6acc8f34722fa57f60125f8dcd3b466759f05408c65fc87d854
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2015 Hasim Sofaruddin
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# JqueryIndonesiaRegionsRails
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jquery_indonesia_regions_rails`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'jquery_indonesia_regions_rails'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install jquery_indonesia_regions_rails
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
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).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
1. Fork it ( https://github.com/[my-github-username]/jquery_indonesia_regions_rails/fork )
|
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
39
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "jquery_indonesia_regions_rails"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'jquery_indonesia_regions_rails/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "jquery_indonesia_regions_rails"
|
|
8
|
+
spec.version = JqueryIndonesiaRegionsRails::VERSION
|
|
9
|
+
spec.authors = ["Hasim Sofaruddin"]
|
|
10
|
+
spec.email = ["harudin91@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %q{Asset pipeline for jquery-indonesia-regions plugin}
|
|
13
|
+
spec.description = %q{Asset pipeline for jquery-indonesia-regions plugin for your rails app}
|
|
14
|
+
spec.homepage = "https://github.com/simudin/jquery_indonesia_regions_rails"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
17
|
+
spec.bindir = "exe"
|
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
spec.license = "MIT"
|
|
21
|
+
|
|
22
|
+
if spec.respond_to?(:metadata)
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
spec.add_dependency "jquery-rails", '~> 0'
|
|
27
|
+
|
|
28
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
|
29
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
30
|
+
|
|
31
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
(function ($){
|
|
2
|
+
$.fn.jqueryIndonesiaRegions = function(options){
|
|
3
|
+
var settings = $.extend({
|
|
4
|
+
type: "city"
|
|
5
|
+
}, options);
|
|
6
|
+
|
|
7
|
+
if (settings.type === "city"){
|
|
8
|
+
var cities = {
|
|
9
|
+
'Sumedang': 'Sumedang',
|
|
10
|
+
'Bandung': 'Bandung',
|
|
11
|
+
'Jakarta': 'Jakarta'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
for(var city_val in cities) {
|
|
15
|
+
$('<option />', {value: city_val, text: cities[city_val]}).appendTo(this);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
if (settings.type === "island"){
|
|
21
|
+
var islands = {
|
|
22
|
+
'Jawa': 'Jawa',
|
|
23
|
+
'Sumatra': 'Sumatra',
|
|
24
|
+
'Sulawesi': 'Sulawesi'
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
for(var island_val in islands) {
|
|
28
|
+
$('<option />', {value: island_val, text: islands[island_val]}).appendTo(this);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return this;
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
if (settings.type === "province"){
|
|
35
|
+
var provinces = {
|
|
36
|
+
'Jawa Barat': 'Jawa Barat',
|
|
37
|
+
'Sumatra Utara': 'Sumatra Utara',
|
|
38
|
+
'Sulawesi Tengah': 'Sulawesi Tengah'
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
for(var province_val in provinces) {
|
|
42
|
+
$('<option />', {value: province_val, text: provinces[province_val]}).appendTo(this);
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}(jQuery));
|
metadata
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: jquery_indonesia_regions_rails
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Hasim Sofaruddin
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-08-23 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: jquery-rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.9'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.9'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
description: Asset pipeline for jquery-indonesia-regions plugin for your rails app
|
|
56
|
+
email:
|
|
57
|
+
- harudin91@gmail.com
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- ".rspec"
|
|
64
|
+
- ".travis.yml"
|
|
65
|
+
- Gemfile
|
|
66
|
+
- MIT-LICENSE
|
|
67
|
+
- README.md
|
|
68
|
+
- Rakefile
|
|
69
|
+
- bin/console
|
|
70
|
+
- bin/setup
|
|
71
|
+
- jquery_indonesia_regions_rails.gemspec
|
|
72
|
+
- lib/jquery_indonesia_regions_rails.rb
|
|
73
|
+
- lib/jquery_indonesia_regions_rails/version.rb
|
|
74
|
+
- vendor/assets/javascripts/jquery-indonesia-regions.js
|
|
75
|
+
homepage: https://github.com/simudin/jquery_indonesia_regions_rails
|
|
76
|
+
licenses:
|
|
77
|
+
- MIT
|
|
78
|
+
metadata: {}
|
|
79
|
+
post_install_message:
|
|
80
|
+
rdoc_options: []
|
|
81
|
+
require_paths:
|
|
82
|
+
- lib
|
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: '0'
|
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
|
+
requirements:
|
|
90
|
+
- - ">="
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '0'
|
|
93
|
+
requirements: []
|
|
94
|
+
rubyforge_project:
|
|
95
|
+
rubygems_version: 2.4.5
|
|
96
|
+
signing_key:
|
|
97
|
+
specification_version: 4
|
|
98
|
+
summary: Asset pipeline for jquery-indonesia-regions plugin
|
|
99
|
+
test_files: []
|