jekyll-spotify-plugin 3.0.1.deprecated

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8201ccdbce17aae9df7d84cf269a51922e051642
4
+ data.tar.gz: 2ccdacb7ef59fd5b82d303b79305cab4ea637f2a
5
+ SHA512:
6
+ metadata.gz: 9abdf58994c187e02ba4e6a8d5c95f6fc0877e2a23ad6da6c76686d5ec90c1b2774971a8690953a60fffbde10cf5b1502953eda538a17ee5e6c0022bdcdf480c
7
+ data.tar.gz: 62985c2fb38e9f44c35a1b03ef500c3ff18f903a4cb362952d297c03a9f06b536e1b065b0dfa431c3a99de1d2a1adeacce83221fbd81e3d3a719831aa215e6ee
@@ -0,0 +1,21 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /dev/
4
+ /test/
5
+ /Gemfile.lock
6
+ /_yardoc/
7
+ /.directory/
8
+ /bak/
9
+ deploy.sh
10
+ /website/
11
+ /local_test/
12
+ /CODE_OF_CONDUCT.md
13
+ /coverage/
14
+ /doc/
15
+ /_vendor/
16
+ /notes/
17
+ /pkg/
18
+ /spec/reports/
19
+ /tmp/
20
+ /**/*.sass-cache
21
+ /style/**/*.sass-cache
@@ -0,0 +1,11 @@
1
+ sudo: true
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.0
5
+ - 2.3.0
6
+ install:
7
+ - gem install jekyll-spotify-plugin
8
+ script:
9
+ - script/cibuild
10
+ notifications:
11
+ email: false
@@ -0,0 +1,36 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project adheres to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [2.3.3] - 2017-04-01
7
+ ### Remove
8
+ - Unnecessary file removal and folders. Had unnecessary files in the plugin.
9
+ ### Change
10
+ - Folder structure correction for compilation.
11
+ - Changing Travis File's Work Way.
12
+
13
+ ## [2.3.4] - 2017-04-02
14
+ ### Change
15
+ - Changing website layout and some features in the plugin source code.
16
+ - Responsive mode correction. I was wrong for mobile.
17
+
18
+ ## [2.3.5] - 2017-05-09
19
+ ### Change
20
+ - Structure improvements in Ruby code.
21
+
22
+ ## [2.3.6] - 2017-05-09
23
+ ### Change
24
+ - Versioning fix.
25
+
26
+ ## [3.0.0] - 2018-01-29
27
+ ### Add
28
+ - Remove Bootstrap dependency
29
+ - New structure HTML and CSS - [BEM]
30
+
31
+ ## [3.0.1] - 2018-02-12
32
+ ### Change
33
+
34
+ - Attention! The Jekyll Spotify Plugin is deprecated!
35
+ Now the project is being continued with the plugin "Jektify" which can also be found in "rubygems.org".
36
+ Jektify: https://jektify.github.io
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jekyll-spotify.gemspec
4
+ gemspec
5
+
6
+ # if ENV["JEKYLL_VERSION"]
7
+ # gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
8
+ # end
9
+
10
+ gem "bundler"
11
+ gem "rake"
12
+ gem "jekyll"
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 William C. Canin - Deprecated
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,7 @@
1
+ # Jekyll Spotify Plugin
2
+
3
+ Attention! The Jekyll Spotify Plugin is deprecated!
4
+
5
+ Now the project is being continued with the plugin "Jektify" which can also be found in "rubygems.org".
6
+
7
+ Jektify: https://jektify.github.io
@@ -0,0 +1,19 @@
1
+ @charset "UTF-8";
2
+
3
+ .jsp_deprecated{
4
+ background-color: red;
5
+ color: white;
6
+ margin: 30px;
7
+ padding: 30px;
8
+ h1,h4{
9
+ background-color: #e82f2f;
10
+ color: white;
11
+ }
12
+ h1,h4{
13
+ padding: 15px;
14
+ }
15
+ a{
16
+ color: black;
17
+ text-decoration: underline;
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ @charset "UTF-8";
2
+
3
+ .jsp_deprecated{
4
+ background-color: red;
5
+ color: white;
6
+ margin: 30px;
7
+ padding: 30px;
8
+ h1,h4{
9
+ background-color: #e82f2f;
10
+ color: white;
11
+ }
12
+ h1,h4{
13
+ padding: 15px;
14
+ }
15
+ a{
16
+ color: black;
17
+ text-decoration: underline;
18
+ }
19
+ }
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jekyll-spotify-plugin/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jekyll-spotify-plugin"
8
+ spec.version = Jekyll::Spotify::Plugin::VERSION
9
+ spec.authors = ["William Canin"]
10
+ spec.email = ["william.costa.canin@gmail.com"]
11
+
12
+ spec.summary = %q{Jekyll Spotify Plugin - Deprecated}
13
+ spec.homepage = "https://github.com/williamcanin/jekyll-spotify-plugin"
14
+ spec.license = "MIT"
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
+
21
+ spec.required_ruby_version = '>= 2.3.6'
22
+
23
+ spec.add_dependency "jekyll", "~> 3.7", "~> 3.7.0"
24
+ spec.add_dependency "sass", "~> 3.5","~> 3.5.5"
25
+ # spec.add_dependency "bootstrap", "~> 4.0","~> 4.0.0" # DEPRECATED
26
+
27
+ spec.add_development_dependency "bundler", "~> 1.16","~> 1.16.1"
28
+ spec.add_development_dependency "rake", "~> 12.3","~> 12.3.0"
29
+ end
@@ -0,0 +1,4 @@
1
+ require "jekyll-spotify-plugin/version"
2
+ require "jekyll-spotify-plugin/utils"
3
+ require "jekyll-spotify-plugin/template"
4
+ require "jekyll-spotify-plugin/main"
@@ -0,0 +1,97 @@
1
+ require "jekyll"
2
+ require "yaml"
3
+ require "benchmark"
4
+ require "find"
5
+ require "fileutils"
6
+ require "open-uri"
7
+
8
+ module Jekyll
9
+ module Spotify
10
+ module Plugin
11
+
12
+ # Instance class
13
+ $utils = Utils.new
14
+ $template = Template.new
15
+
16
+
17
+ class Generator < Jekyll::Generator
18
+
19
+ def generate(site)
20
+ @site = site
21
+ $utils.copy_sass_manual
22
+ end
23
+
24
+ end # Generator
25
+
26
+ # class load SASS
27
+ class << self
28
+
29
+ def loadSass
30
+ $utils.configure_sass($utils)
31
+ end
32
+
33
+ end # self
34
+
35
+ # Implement Jekyll Spotify Plugin in Page
36
+ class Main < Liquid::Tag
37
+
38
+ def initialize(tag_name, input, tokens)
39
+ super
40
+ @tag_name = tag_name
41
+ @input = input
42
+ end
43
+
44
+ def render(context)
45
+
46
+ input_split = $utils.split_params(@input)
47
+
48
+ user = $utils.parameter_user(input_split)
49
+ type = $utils.parameter_type(input_split)
50
+ id = $utils.parameter_id(input_split)
51
+ theme = $utils.parameter_theme(input_split)
52
+
53
+ # Transpiler variable "theme"
54
+ theme == "light" ? theme = "white" : theme = $utils.parameter_theme(input_split)
55
+
56
+ # Customizing Url Spotify
57
+ if not user.empty? and type == "playlist"
58
+ url = "https://embed.spotify.com/?uri=#{@tag_name}:user:#{user}:#{type}:#{id}&theme=#{theme}"
59
+ else
60
+ url = "https://embed.spotify.com/?uri=#{@tag_name}:#{type}:#{id}&theme=#{theme}"
61
+ end
62
+
63
+ # Load YML
64
+ yml = $utils.yml_config('_config.yml')
65
+
66
+ # Load configuration root of Jekyll Spotify Plugin in _config.yml
67
+ spotify_root = yml["spotify"]
68
+
69
+ # Message to report error if the Spotify settings in _config.yml are not found and the Jekyll Spotify Plugin is loaded in _config.yml
70
+ $utils.errors_not_found_jsp_config(spotify_root, "[x] Error: Configuration Jekyll Spotify Plugin not found in _config.yml")
71
+
72
+ # Checks a series of error values in the settings of Jekyll Spotify Plugin in _config.yml
73
+ $utils.errors_value_incorrect(spotify_root["title"]["enable"], true, false, "[x] Error: Variable 'enable' from 'title' is incorrect.")
74
+
75
+ $utils.errors_value_incorrect(spotify_root["description"]["enable"], true, false, "[x] Error: Variable 'enable' from 'description' is incorrect.")
76
+
77
+ # Checks a series of error values in the settings of Jekyll Spotify Plugin in sctructure {% spotify [user]/[type]/[id]/[theme] %}
78
+ $utils.errors_value_incorrect(theme, "dark", "white", "[x] Error: Parameter incorrect in {% spotify [user]/[type]/[id]/[theme] %}.")
79
+
80
+ # If there are no errors starting the plugin
81
+ $template.content(spotify_root, type, url, theme, id)
82
+
83
+ end # def render
84
+
85
+ end # class Main
86
+
87
+
88
+ end # module Plugin
89
+ end # module Spotify
90
+ end # module Jekyll
91
+
92
+
93
+ # Load files: (SASS)
94
+ Jekyll::Spotify::Plugin.loadSass
95
+
96
+ # Register plugins (tag)
97
+ Liquid::Template.register_tag('spotify', Jekyll::Spotify::Plugin::Main)
@@ -0,0 +1,35 @@
1
+ module Jekyll
2
+ module Spotify
3
+ module Plugin
4
+ class Template
5
+
6
+ $jektify__year = Time.new
7
+
8
+ def content(spotify_root, type, url, theme, id)
9
+
10
+ jektify__brand_link = "https://williamcanin.github.io/jekyll-spotify-plugin"
11
+
12
+ jektify__description = spotify_root["title"]["enable"] == false and spotify_root["description"]["enable"] == false ? jektify__description = "none" : jektify__description = "block"
13
+
14
+ jektify__title = spotify_root["title"]["enable"] == true ? jektify__title = "block" : jektify__title = "none"
15
+
16
+ jektify__description = spotify_root["description"]["enable"] == true ? jektify__description = "block" : jektify__description = "none"
17
+
18
+ type == "album" || type == "playlist" || type == "artist" ? height = 380 : height = 80
19
+
20
+ open_track = spotify_root["open"] == true ? open_track = "block" : open_track = "none"
21
+
22
+ jektify__button__Rotate = spotify_root["open"] == true ? jektify__button__Rotate = "jektify__button--open" : jektify__button__Rotate = "jektify__button--closed"
23
+
24
+
25
+ enable_spotify = spotify_root["enable"]
26
+
27
+ if enable_spotify == true
28
+ %(<div class="jsp_deprecated"><h1>Jekyll Spotify Plugin - ALERT! </h1><h2>Attention! The Jekyll Spotify Plugin is deprecated!</h2><h3>Now the project is being continued with the plugin "Jektify" which can also be found in <a href="https://rubygems.org/gems/jektify" target="_blank">"rubygems.org"</a>.</h3><h4>Jektify - Doc: <a href="https://jektify.github.io" target="_blank">https://jektify.github.io</a></h4></div>)
29
+ end
30
+
31
+ end # def content
32
+ end # class Template
33
+ end # module Plugin
34
+ end # module Spotify
35
+ end # module Jekyll
@@ -0,0 +1,89 @@
1
+ module Jekyll
2
+ module Spotify
3
+ module Plugin
4
+ class Utils
5
+
6
+ def gem_path
7
+ @gem_path ||= File.expand_path '../..', File.dirname(__FILE__)
8
+ end
9
+
10
+ def assets_path
11
+ File.join gem_path, 'assets'
12
+ end
13
+
14
+
15
+ def stylesheets_sass_path
16
+ File.join assets_path, 'stylesheets/sass'
17
+ end
18
+
19
+ def stylesheets_sass_manual_path
20
+ File.join assets_path, 'stylesheets/sass/manual'
21
+ end
22
+
23
+
24
+ def copy_sass_manual
25
+ yml = yml_config('_config.yml')
26
+ return false if yml["spotify"]["sass"].nil? || yml["spotify"]["sass"]["dir"].nil?
27
+ use_sass_jekyll = yml["spotify"]["sass"]["jekyll"]
28
+ dir_copy = File.join yml["spotify"]["sass"]["dir"], 'jekyll_spotify_plugin'
29
+ if use_sass_jekyll == false
30
+ if not File.directory?(dir_copy)
31
+ FileUtils::mkdir_p "#{dir_copy}"
32
+ end
33
+ FileUtils.copy_entry stylesheets_sass_manual_path, dir_copy
34
+ end
35
+ end
36
+
37
+ def parameter_user(input_split)
38
+ input_split[0].strip
39
+ end
40
+
41
+ def parameter_type(input_split)
42
+ input_split[1].strip
43
+ end
44
+
45
+ def parameter_id(input_split)
46
+ input_split[2].strip
47
+ end
48
+
49
+ def parameter_theme(input_split)
50
+ input_split[3].strip
51
+ end
52
+
53
+ def yml_config(yml)
54
+ YAML::load_file(File.join(yml))
55
+ end
56
+
57
+ def split_params(params)
58
+ params.split("/")
59
+ end
60
+
61
+ def errors_not_found_jsp_config(verify, message)
62
+ if not verify
63
+ raise RuntimeError, "#{message}"
64
+ fail
65
+ end
66
+ end
67
+
68
+ def errors_value_incorrect(value_incorrect, value1, value2, message)
69
+ if not value_incorrect == value1 and not value_incorrect == value2
70
+ # Message for error details
71
+ raise RuntimeError, "#{message}"
72
+ fail
73
+ end
74
+ end
75
+
76
+ def choose_theme(receive, theme_name)
77
+ receive == "light" ? theme_name = "white" : theme_name = "dark"
78
+ end
79
+
80
+ def configure_sass(utils)
81
+ require "sass"
82
+ ::Sass.load_paths << utils.stylesheets_sass_path
83
+ ::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
84
+ end
85
+
86
+ end # class Utils
87
+ end # module Plugin
88
+ end # module Spotify
89
+ end # module Jekyll
@@ -0,0 +1,17 @@
1
+ module Jekyll
2
+ module Spotify
3
+ module Plugin
4
+
5
+ # Description
6
+ #
7
+ # MAJOR: It includes API changes and can break backward compatibility
8
+ # MINOR: It includes new features without breaking existing APIs
9
+ # PATCH: Fixes bugs and brings improvements in existing implementations
10
+
11
+ MAJOR = 3
12
+ MINOR = 0
13
+ PATCH = "1.deprecated"
14
+ VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-spotify-plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.1.deprecated
5
+ platform: ruby
6
+ authors:
7
+ - William Canin
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-02-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.7'
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: 3.7.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.7'
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: 3.7.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: sass
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.5'
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 3.5.5
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '3.5'
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: 3.5.5
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.16'
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 1.16.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.16'
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: 1.16.1
73
+ - !ruby/object:Gem::Dependency
74
+ name: rake
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '12.3'
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 12.3.0
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '12.3'
90
+ - - "~>"
91
+ - !ruby/object:Gem::Version
92
+ version: 12.3.0
93
+ description:
94
+ email:
95
+ - william.costa.canin@gmail.com
96
+ executables: []
97
+ extensions: []
98
+ extra_rdoc_files: []
99
+ files:
100
+ - ".gitignore"
101
+ - ".travis.yml"
102
+ - CHANGELOG
103
+ - Gemfile
104
+ - LICENSE.txt
105
+ - README.md
106
+ - assets/stylesheets/sass/_jekyll_spotify_plugin.scss
107
+ - assets/stylesheets/sass/manual/_jekyll_spotify_plugin.scss
108
+ - jekyll-spotify-plugin.gemspec
109
+ - lib/jekyll-spotify-plugin.rb
110
+ - lib/jekyll-spotify-plugin/main.rb
111
+ - lib/jekyll-spotify-plugin/template.rb
112
+ - lib/jekyll-spotify-plugin/utils.rb
113
+ - lib/jekyll-spotify-plugin/version.rb
114
+ homepage: https://github.com/williamcanin/jekyll-spotify-plugin
115
+ licenses:
116
+ - MIT
117
+ metadata: {}
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 2.3.6
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">"
130
+ - !ruby/object:Gem::Version
131
+ version: 1.3.1
132
+ requirements: []
133
+ rubyforge_project:
134
+ rubygems_version: 2.6.14
135
+ signing_key:
136
+ specification_version: 4
137
+ summary: Jekyll Spotify Plugin - Deprecated
138
+ test_files: []