jekyll-spotify 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36cc9f2577691de31a9caebbffcc1ee58afdfd43
4
- data.tar.gz: cb9d2e3ffff07b1239e9b6c9690421c5939b9fbc
3
+ metadata.gz: 8d2baf8fb16a42c1b09a3911728292cd6e161753
4
+ data.tar.gz: 3085aaa31c55c3a347ee1e928d8eb3423054bc78
5
5
  SHA512:
6
- metadata.gz: 605b1a68fb5af694717203efec7e2673272e9ac76a4f7ed3dcaf159490880e646136b5aed5ad7b9b0b8f3b58dadf5e71f16ce93b152ff001b012a35812974938
7
- data.tar.gz: 5e2551aa49b073956ccd171194aa6d5eeb93a18d2e8dfdac0a557228a0418a32b5991bbaa42f2e04bb66bd9be68edddf0e51957edda6a2c3c3a0b3ab071b4fb8
6
+ metadata.gz: e098641c86d7dde75fc758795b215f2510483bb846b25a43fb6bc85f15bc8f349fe65fe2cf96e62d0de368ddecda52863a8f914819b7e51bf3729d6aeb4380f1
7
+ data.tar.gz: ce0953da461c9c9d72967ab202b666f93838864cec9d496ba994372043c5521228b926fc6a2cf28169246547a361217359aef2f99d5c548c3474a023eb858737
@@ -0,0 +1,6 @@
1
+ # v0.0.3
2
+
3
+ - Cleared the code
4
+ - Added default width and height
5
+ - Dependencies are edited
6
+ - Remove unit test
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
+
4
+ gem 'jekyll', '>= 3.0.0'
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- [![Gem Version](https://badge.fury.io/rb/jekyll-spotify.svg)](https://badge.fury.io/rb/jekyll-spotify) [![Build Status](https://travis-ci.org/MertcanGokgoz/Jekyll-Spotify.svg?branch=master)](https://travis-ci.org/MertcanGokgoz/Jekyll-Spotify)
2
-
3
- # Jekyll Spotify
1
+ # Jekyll Spotify [![Gem Version](https://badge.fury.io/rb/jekyll-spotify.svg)](https://badge.fury.io/rb/jekyll-spotify)
4
2
 
5
3
  This Jekyll pluging provides a tag that takes Spotify URI and generates a html snippet to embed player your site.
6
4
 
@@ -9,7 +7,7 @@ This Jekyll pluging provides a tag that takes Spotify URI and generates a html s
9
7
  Add gemfile
10
8
 
11
9
  ```
12
- gem 'jekyll-spotify', '~> 0.0.1'
10
+ gem 'jekyll-spotify'
13
11
  ```
14
12
 
15
13
  Execute
@@ -36,10 +34,16 @@ gems: [jekyll-spotify]
36
34
  {% spotify spotify:track:3fuNydG9kg2Y09i8Foqq0p %}
37
35
  ```
38
36
 
37
+ or
38
+
39
+ ```
40
+ {% spotify spotify:track:3fuNydG9kg2Y09i8Foqq0p 200 300 %}
41
+ ```
42
+
39
43
  ## Result
40
44
 
41
45
  output the following code include page
42
46
 
43
47
  ```
44
- <iframe src="https://embed.spotify.com/?uri=spotify%3Atrack%3A3fuNydG9kg2Y09i8Foqq0p" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
48
+ <iframe src="https://embed.spotify.com/?uri=spotify%3Atrack%3A3fuNydG9kg2Y09i8Foqq0p" width="100%" height="300" frameborder="0" allowtransparency="true"></iframe>
45
49
  ```
@@ -8,8 +8,9 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Jekyll::Spotify::VERSION
9
9
  spec.authors = ["MertcanGokgoz"]
10
10
  spec.email = ["mertcan.gokgoz@gmail.com"]
11
- spec.date = "2016-08-13"
11
+ spec.date = "2016-10-08"
12
12
  spec.rubygems_version = "2.4.6"
13
+ spec.required_ruby_version = '>= 2.0.0'
13
14
 
14
15
  spec.summary = %q{Jekyll-Spotify Easily output Spotify Embed Player}
15
16
  spec.description = %q{Easily output Spotify Embed Player}
@@ -21,9 +22,6 @@ Gem::Specification.new do |spec|
21
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
23
  spec.require_paths = ["lib"]
23
24
 
24
- spec.add_development_dependency "jekyll", ">= 3.1.0", "< 3.2.0"
25
+ spec.add_dependency "jekyll", "~> 3.0"
25
26
  spec.add_development_dependency "bundler", "~> 1.6"
26
- spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rubocop", "~> 0.42"
29
27
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Spotify
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -2,27 +2,37 @@
2
2
  # Author: Mertcan GOKGOZ https://mertcangokgoz.com
3
3
  # Description: Easily output Spotify Embed Player.
4
4
  #
5
- # Syntax: {% spotify [spotify-uri] %}
5
+ # Syntax: {% spotify [spotify-uri] [width height] %}
6
6
  #
7
- # Example: {% spotify spotify:track:3fuNydG9kg2Y09i8Foqq0p %}
7
+ # Example: {% spotify spotify:track:3fuNydG9kg2Y09i8Foqq0p %}
8
+ # Example2: {% spotify spotify:track:3fuNydG9kg2Y09i8Foqq0p 200 300 %}
8
9
  #
9
10
  #
10
11
  # Output: <iframe src="https://embed.spotify.com/?uri=spotify%3Atrack%3A3fuNydG9kg2Y09i8Foqq0p"
11
- # width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
12
+ # width="100%" height="300" frameborder="0" allowtransparency="true"></iframe>
12
13
  #
13
14
 
14
15
  module Jekyll
15
16
  class Spotify < Liquid::Tag
16
- @width = 300
17
- @height = 300
18
17
 
19
- def initialize(name, id, tokens)
20
- super
21
- @id = id
18
+ def initialize(tag_name, id, tokens)
19
+ super
20
+ @id = id
22
21
  end
23
22
 
24
23
  def render(context)
25
- %(<iframe src="https://embed.spotify.com/?uri=#{@id}" width="#{@width}" height="#{@height}" frameborder="0" allowtransparency="true"></iframe>)
24
+ @id, @width, @height = @id.split(' ').map(&:strip)
25
+
26
+ if @width.nil? && @height.nil?
27
+ @width = '100%'
28
+ @height = '300'
29
+ end
30
+
31
+ if @id
32
+ %(<iframe src=\"https://embed.spotify.com/?uri=#{@id}\" width=\"#{@width}\" height=\"#{@height}\" frameborder=\"0\" allowtransparency=\"true\"></iframe>)
33
+ else
34
+ %(Error input, expected syntax: {% spotify id [width] [height] %})
35
+ end
26
36
  end
27
37
  end
28
38
  end
metadata CHANGED
@@ -1,57 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-spotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MertcanGokgoz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-13 00:00:00.000000000 Z
11
+ date: 2016-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 3.1.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 3.2.0
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 3.1.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 3.2.0
33
- - !ruby/object:Gem::Dependency
34
- name: bundler
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.6'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '1.6'
47
- - !ruby/object:Gem::Dependency
48
- name: rspec
49
15
  requirement: !ruby/object:Gem::Requirement
50
16
  requirements:
51
17
  - - "~>"
52
18
  - !ruby/object:Gem::Version
53
19
  version: '3.0'
54
- type: :development
20
+ type: :runtime
55
21
  prerelease: false
56
22
  version_requirements: !ruby/object:Gem::Requirement
57
23
  requirements:
@@ -59,33 +25,19 @@ dependencies:
59
25
  - !ruby/object:Gem::Version
60
26
  version: '3.0'
61
27
  - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '10.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '10.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rubocop
28
+ name: bundler
77
29
  requirement: !ruby/object:Gem::Requirement
78
30
  requirements:
79
31
  - - "~>"
80
32
  - !ruby/object:Gem::Version
81
- version: '0.42'
33
+ version: '1.6'
82
34
  type: :development
83
35
  prerelease: false
84
36
  version_requirements: !ruby/object:Gem::Requirement
85
37
  requirements:
86
38
  - - "~>"
87
39
  - !ruby/object:Gem::Version
88
- version: '0.42'
40
+ version: '1.6'
89
41
  description: Easily output Spotify Embed Player
90
42
  email:
91
43
  - mertcan.gokgoz@gmail.com
@@ -94,17 +46,14 @@ extensions: []
94
46
  extra_rdoc_files: []
95
47
  files:
96
48
  - ".gitignore"
97
- - ".pullapprove.yml"
98
49
  - ".rspec"
99
- - ".travis.yml"
50
+ - CHANGELOG
100
51
  - Gemfile
101
52
  - LICENSE.txt
102
53
  - README.md
103
- - Rakefile
104
54
  - jekyll-spotify.gemspec
105
55
  - lib/jekyll-spotify/version.rb
106
56
  - lib/spotify.rb
107
- - script/build.sh
108
57
  homepage: https://github.com/MertcanGokgoz/Jekyll-Spotify
109
58
  licenses:
110
59
  - MIT
@@ -117,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
66
  requirements:
118
67
  - - ">="
119
68
  - !ruby/object:Gem::Version
120
- version: '0'
69
+ version: 2.0.0
121
70
  required_rubygems_version: !ruby/object:Gem::Requirement
122
71
  requirements:
123
72
  - - ">="
@@ -1,9 +0,0 @@
1
- approve_by_comment: true
2
- approve_regex: ^Approved
3
- reject_regex: ^Rejected
4
- reset_on_push: false
5
- reviewers:
6
- members:
7
- - MertcanGokgoz
8
- name: pullapprove
9
- required: 1
@@ -1,24 +0,0 @@
1
- os: linux
2
- language: ruby
3
- before_script:
4
- - chmod +x script/build.sh
5
- rvm:
6
- - 2.3.1
7
- - 2.2
8
- - 1.9.3
9
-
10
- before_script: bundle update
11
- script: "script/build.sh"
12
- branches:
13
- only:
14
- - master
15
- sudo: false
16
- cache: bundler
17
-
18
- notifications:
19
- email:
20
- recipients:
21
- - mertcan.gokgoz@gmail.com
22
- - admin@mertcangokgoz.com
23
- on_success: never
24
- on_failure: always
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,19 +0,0 @@
1
- #! /bin/bash
2
-
3
- if [ $TRAVIS_PULL_REQUEST == "true" ]; then
4
- echo "This is a PR. Exiting"
5
- exit 0
6
- fi
7
-
8
- set -e
9
-
10
- echo "+===================================+"
11
- echo "Check status"
12
- echo "+===================================+"
13
-
14
- bundle exec rspec
15
- bundle exec rake build
16
-
17
- echo "+===================================+"
18
- echo "Checked"
19
- echo "+===================================+"