slick-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6496012e164187fbc40cc7ec7ca11a9b3f9d49152881a16380854182d3f3a818
4
+ data.tar.gz: 1f3de6d42c1902e4c16a52ab12876399b2cd14ed45b71348820d345af40ed80a
5
+ SHA512:
6
+ metadata.gz: 6f6ed3a8e9d52732db1b551a41228f0c436d4b8b1cac7db34cf32a10e2f55980be155ae074573ca626a69aaea45f3fceecaac40f8a4104e945a1255d051eb77e
7
+ data.tar.gz: 9e6e0b502a46f2eaed2b649ae3f62a952592ed197540d7722784dd9201ea4c9769158c8edb4743b8a3620634510643a8a533a5554c7625ea0ad7efbb4679a031
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2019 Roberto Vasquez Angel
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/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require "bundler/setup"
5
+ rescue LoadError
6
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
7
+ end
8
+
9
+ require "rdoc/task"
10
+
11
+ RDoc::Task.new(:rdoc) do |rdoc|
12
+ rdoc.rdoc_dir = "rdoc"
13
+ rdoc.title = "Slick Rails"
14
+ rdoc.options << "--line-numbers"
15
+ rdoc.rdoc_files.include("README.rdoc")
16
+ rdoc.rdoc_files.include("lib/**/*.rb")
17
+ end
18
+
19
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1 @@
1
+ //= require slick/rails/application
@@ -0,0 +1 @@
1
+ //= require_tree ./application
@@ -0,0 +1,2 @@
1
+ $ ->
2
+ $('[data-slick]').slick()
@@ -0,0 +1,21 @@
1
+ module Slick
2
+ module Rails
3
+ # Example:
4
+ #
5
+ # # app/controllers/application_controller.rb
6
+ # class ApplicationController < ActionController::Base
7
+ # view_helper Slick::Rails::ApplicationViewHelper, as: :slick_helper
8
+ # end
9
+ #
10
+ class ApplicationViewHelper < Rao::ViewHelper::Base
11
+ # Example:
12
+ #
13
+ # # app/layouts/application.html.haml
14
+ # = slick_helper(self).render_carousel()
15
+ #
16
+ def render_carousel(options = {}, &block)
17
+ render(options: options, block: block)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,7 @@
1
+ - if options.any?
2
+ - options_for_js = options.collect { |k,v| "\"#{k.to_s.camelize(:lower)}\": #{v}" }.join(', ')
3
+ %div{ data: { slick: "{#{options_for_js.html_safe}}" } }
4
+ = block.call
5
+ - else
6
+ %div{ data: { slick: true } }
7
+ = block.call
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.precompile += %w( slick-rails.css )
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "coffee-rails"
4
+ require "haml-rails"
5
+ require "rao-view_helper"
6
+
7
+ require "slick/rails/engine"
8
+
9
+ module Slick
10
+ module Rails
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Slick
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ isolate_namespace Slick::Rails
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Slick
4
+ module Rails
5
+ VERSION = "0.0.1".freeze
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: slick-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Roberto Vasquez Angel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: coffee-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: haml-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rao-view_helper
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
56
+ email:
57
+ - roberto@vasquez-angel.de
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - Rakefile
64
+ - app/assets/javascripts/slick-rails.js
65
+ - app/assets/javascripts/slick/rails/application.js
66
+ - app/assets/javascripts/slick/rails/application/core.js.coffee
67
+ - app/view_helpers/slick/rails/application_view_helper.rb
68
+ - app/views/slick/rails/application_view_helper/_render_carousel.html.haml
69
+ - config/initializers/assets.rb
70
+ - lib/slick-rails.rb
71
+ - lib/slick/rails/engine.rb
72
+ - lib/slick/rails/version.rb
73
+ homepage:
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.7.7
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Simple Form fake inputs.
97
+ test_files: []