itunes_information_slack 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 83bd90db015759bb366b9ef319d2290ac0f08fdb
4
+ data.tar.gz: 6e690b6a0c03935e41a1a50e5f1c16291a26fdb3
5
+ SHA512:
6
+ metadata.gz: a010de0631a66a791883e212934c143494cfe074968b520e3e943457b22896049c4b0d40856df5d2f20868cd37e23efd80efab7ef8bff9c71a9be0517cd18756
7
+ data.tar.gz: fe3a546ac30ea83ad8cdb966f9a627c688a76f95d9e49886e477720e459dabad0b29b504d4c39d4e0a59f7a6d5e160b0f8eeffe362f53e0f20b57dbd244e97b4
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # A sample Gemfile
2
+ source "https://rubygems.org"
3
+
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # これは何
2
+
3
+ slack に再生中の曲を送信する
4
+
5
+ # インストール
6
+
7
+ ```
8
+ gem install
9
+ ```
10
+
11
+ # 使い方
12
+
13
+
14
+ 以下の環境変数を設定してください
15
+
16
+ * SLACK_API_TOKEN (webhook integrationを参照してください)
17
+ * SLACK_TEAM
18
+ * SLACK_CHANNEL (option)
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require 'itunes-client'
4
+ require 'slack-notify'
5
+
6
+ track = Itunes::Player.current_track
7
+
8
+ body = "再生中の曲は #{track.name} です。#{track.album} : #{track.artist}"
9
+
10
+ team = ENV["SLACK_TEAM"]
11
+ token = ENV["SLACK_API_TOKEN"]
12
+ channel = ENV["SLACK_CHANNEL"] || "#random"
13
+
14
+ client = SlackNotify::Client.new(team, token,
15
+ channel: channel,
16
+ username: "iTunes",
17
+ icon_url: "https://raw.githubusercontent.com/eiel/itunes_information_slack/images/itunes.png"
18
+ )
19
+
20
+ client.notify body
data/images/itunes.png ADDED
Binary file
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'itunes_information_slack/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "itunes_information_slack"
8
+ spec.version = ItunesInformationSlack::VERSION
9
+ spec.authors = ["Tomohiko Himura"]
10
+ spec.email = ["eiel.hal@gmail.com"]
11
+ spec.summary = %q{Send information on itunes play music informatio to slack}
12
+ spec.description = %q{Send information on itunes play music informatio to slack}
13
+ spec.homepage = "https://github.com/eiel/itunes_information_slack"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency "itunes-client"
22
+ spec.add_runtime_dependency "slack-notify"
23
+ spec.add_development_dependency "bundler", "~> 1.6"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
@@ -0,0 +1,3 @@
1
+ module ItunesInformationSlack
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,5 @@
1
+ require "itunes_information_slack/version"
2
+
3
+ module ItunesInformationSlack
4
+ # Your code goes here...
5
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itunes_information_slack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tomohiko Himura
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: itunes-client
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: slack-notify
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description: Send information on itunes play music informatio to slack
70
+ email:
71
+ - eiel.hal@gmail.com
72
+ executables:
73
+ - itunes_information_slack
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - Gemfile
79
+ - README.md
80
+ - Rakefile
81
+ - bin/itunes_information_slack
82
+ - images/itunes.png
83
+ - itunes_information_slack.gemspec
84
+ - lib/itunes_information_slack.rb
85
+ - lib/itunes_information_slack/version.rb
86
+ homepage: https://github.com/eiel/itunes_information_slack
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.2.2
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Send information on itunes play music informatio to slack
110
+ test_files: []
111
+ has_rdoc: