sakura_rails 0.1.6

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: 100fa75d6b987c97f00f24786d53e9bdb22bd3d43d0bb8b676e693717ac2eace
4
+ data.tar.gz: 5c43ffd5c4bb03ff271dd52fa637d98267e918b80da5fe2512d4a6e0a4b98573
5
+ SHA512:
6
+ metadata.gz: b97192b3c0946cf594f474cec6e484bc3b83c10838e675e7959c28de5b795725a0d6d7c7d7e7a7020ce53153c8e5e1eddc150cceb0e099738dc56bd961bc955c
7
+ data.tar.gz: ae446e318cdd62e3f0c60600d179ba0ed22df7debdc7d899ea3a5c11dd16218e8754ff2be83951807d259e551141ba0aa93b3e6a56cfe95b62fe6cca32f0f907
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2019 satoshi ono
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,28 @@
1
+ # SakuraRails
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'sakura_rails'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install sakura_rails
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'SakuraRails'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/sakura_rails .js
2
+ //= link_directory ../stylesheets/sakura_rails .css
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require rails-ujs
14
+ //= require activestorage
15
+ //= require_tree .
@@ -0,0 +1 @@
1
+ @import "sakura_rails/sakura.scss"
@@ -0,0 +1,142 @@
1
+ section .inner div {
2
+ opacity: 0;
3
+ -webkit-transform-origin: 0px 0px;
4
+ -ms-transform-origin: 0px 0px;
5
+ transform-origin: 0px 0px;
6
+ -webkit-animation-name: Drop;
7
+ animation-name: Drop;
8
+ -webkit-animation-iteration-count: infinite;
9
+ animation-iteration-count: infinite;
10
+ -webkit-animation-timing-function: linear;
11
+ animation-timing-function: linear;
12
+ -webkit-animation-fill-mode: forwards;
13
+ animation-fill-mode: forwards;
14
+ }
15
+
16
+ #sakura .inner div {
17
+ position: absolute;
18
+ display: block;
19
+ width: 10px;
20
+ height: 15px;
21
+ background: url("images/sakura_rails/sakura.png") no-repeat;
22
+ }
23
+
24
+ #sakura .inner div.flake2,
25
+ #sakura .inner div.flake4,
26
+ #sakura .inner div.flake6,
27
+ #sakura .inner div.flake8 {
28
+ background-size: 5px 6px !important;
29
+ }
30
+
31
+
32
+ .flake1 {
33
+ left: 20px;
34
+ -webkit-animation-duration: 2.5s;
35
+ animation-duration: 2.5s;
36
+ }
37
+
38
+ .flake2 {
39
+ left: 40px;
40
+ -webkit-animation-duration: 2.7s;
41
+ animation-duration: 2.7s;
42
+ -webkit-animation-delay: 0.2s;
43
+ animation-delay: 0.2s;
44
+ }
45
+
46
+ .flake3 {
47
+ left: 60px;
48
+ -webkit-animation-duration: 2.9s;
49
+ animation-duration: 2.9s;
50
+ -webkit-animation-delay: 0.4s;
51
+ animation-delay: 0.4s;
52
+ }
53
+
54
+ .flake4 {
55
+ left: 80px;
56
+ -webkit-animation-duration: 2.4s;
57
+ animation-duration: 2.4s;
58
+ -webkit-animation-delay: 0s;
59
+ animation-delay: 0s;
60
+ }
61
+
62
+ .flake5 {
63
+ left: 100px;
64
+ -webkit-animation-duration: 2.4s;
65
+ animation-duration: 2.4s;
66
+ -webkit-animation-delay: 1s;
67
+ animation-delay: 1s;
68
+ }
69
+
70
+ .flake6 {
71
+ left: 150px;
72
+ -webkit-animation-duration: 2.2s;
73
+ animation-duration: 2.2s;
74
+ -webkit-animation-delay: 1.2s;
75
+ animation-delay: 1.2s;
76
+ }
77
+
78
+ .flake7 {
79
+ left: 170px;
80
+ -webkit-animation-duration: 2.7s;
81
+ animation-duration: 2.7s;
82
+ -webkit-animation-delay: 1.2s;
83
+ animation-delay: 1.2s;
84
+ }
85
+
86
+ .flake8 {
87
+ left: 200px;
88
+ -webkit-animation-duration: 3s;
89
+ animation-duration: 3s;
90
+ -webkit-animation-delay: 1.4s;
91
+ animation-delay: 1.4s;
92
+ }
93
+ @-webkit-keyframes Drop {
94
+ 0% {
95
+ -webkit-transform: translateY(0px);
96
+ transform: translateY(0px);
97
+ opacity: 0;
98
+ }
99
+
100
+ 50% {
101
+ -webkit-transform: translateY(50px);
102
+ transform: translateY(50px);
103
+ opacity: 1;
104
+ }
105
+
106
+ 100% {
107
+ -webkit-transform: translateY(100px);
108
+ transform: translateY(100px);
109
+ opacity: 0.3;
110
+ }
111
+ }
112
+
113
+
114
+ #snow .inner div {
115
+ position: absolute;
116
+ display: block;
117
+ width: 5px;
118
+ height: 5px;
119
+ border-radius: 2.5px;
120
+ background: #fff;
121
+ }
122
+
123
+ @keyframes Drop {
124
+ 0% {
125
+ -webkit-transform: translateY(0px);
126
+ transform: translateY(0px);
127
+ opacity: 0;
128
+ }
129
+
130
+ 50% {
131
+ -webkit-transform: translateY(50px);
132
+ transform: translateY(50px);
133
+ opacity: 1;
134
+ }
135
+
136
+ 100% {
137
+ -webkit-transform: translateY(100px);
138
+ transform: translateY(100px);
139
+ opacity: 0.3;
140
+ }
141
+ }
142
+
@@ -0,0 +1,5 @@
1
+ module SakuraRails
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module SakuraRails
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module SakuraRails
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module SakuraRails
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module SakuraRails
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Sakura rails</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "sakura_rails/application", media: "all" %>
9
+ <%= javascript_include_tag "sakura_rails/application" %>
10
+ </head>
11
+ <body>
12
+
13
+ <%= yield %>
14
+
15
+ </body>
16
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ SakuraRails::Engine.routes.draw do
2
+ end
@@ -0,0 +1,19 @@
1
+ module SakuraRails
2
+ class Engine < ::Rails::Engine
3
+
4
+ end
5
+ end
6
+
7
+
8
+
9
+ require 'sakura_rails/view_helper'
10
+ module SakuraRails
11
+ class Engine < ::Rails::Engine
12
+ isolate_namespace SakuraRails
13
+ initializer 'good_item.action_view_helpers' do
14
+ ActiveSupport.on_load :action_view do
15
+ include SakuraRails::ViewHelper
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ module SakuraRails
2
+ VERSION = '0.1.6'
3
+ end
@@ -0,0 +1,18 @@
1
+ module SakuraRails
2
+ module ViewHelper
3
+ def fall_sakura
4
+ content_tag(:section, "", id: "sakura") do
5
+ content_tag(:div, "", class: "inner") do
6
+ concat content_tag(:div,"", class: "flake1")
7
+ concat content_tag(:div,"", class: "flake2")
8
+ concat content_tag(:div,"", class: "flake3")
9
+ concat content_tag(:div,"",class: "flake4")
10
+ concat content_tag(:div,"", class: "flake5")
11
+ concat content_tag(:div,"", class: "flake6")
12
+ concat content_tag(:div,"", class: "flake7")
13
+ concat content_tag(:div,"",class: "flake8")
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ require "sakura_rails/engine"
2
+
3
+ module SakuraRails
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :sakura_rails do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sakura_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
+ platform: ruby
6
+ authors:
7
+ - satoshi ono
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-03-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.2.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.2.2
27
+ description: Description of SakuraRails.
28
+ email:
29
+ - saongtx7@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - MIT-LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - app/assets/config/sakura_rails_manifest.js
38
+ - app/assets/images/sakura_rails/sakura.png
39
+ - app/assets/javascripts/sakura_rails/application.js
40
+ - app/assets/stylesheets/sakura_rails/application.scss
41
+ - app/assets/stylesheets/sakura_rails/sakura.scss
42
+ - app/controllers/sakura_rails/application_controller.rb
43
+ - app/helpers/sakura_rails/application_helper.rb
44
+ - app/jobs/sakura_rails/application_job.rb
45
+ - app/mailers/sakura_rails/application_mailer.rb
46
+ - app/models/sakura_rails/application_record.rb
47
+ - app/views/layouts/sakura_rails/application.html.erb
48
+ - config/routes.rb
49
+ - lib/sakura_rails.rb
50
+ - lib/sakura_rails/engine.rb
51
+ - lib/sakura_rails/version.rb
52
+ - lib/sakura_rails/view_helper.rb
53
+ - lib/tasks/sakura_rails_tasks.rake
54
+ homepage: ''
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubygems_version: 3.0.3
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: Summary of SakuraRails.
77
+ test_files: []