acbgm 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +8 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/acbgm.gemspec +33 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/acbgm.rb +51 -0
- data/lib/acbgm/version.rb +3 -0
- metadata +53 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2f2eb1592815354cb7d41dc8a3ec0caffe55080a
|
4
|
+
data.tar.gz: 250fa39bcaa7910f83bf2cd08ef06892154afcda
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 88d21ad2283e1834da8e94cdde06a1c0e4faab3efff391b4e344ca9a3bbd1b531a79997cb7701e4886795d25e7950897fd93e1d9328501edf830381cf8c90c42
|
7
|
+
data.tar.gz: 91948ae11ded72bda18f2793287ac70083f32931719cb1eb9a2c4a4dad1ca709a393d2b8a26292fb7721caf22162a9748b4d25b1a9ba48c2c4c6c5e71b77b680
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Acbgm
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/acbgm`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'acbgm'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install acbgm
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/acbgm.
|
data/Rakefile
ADDED
data/acbgm.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "acbgm/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "acbgm"
|
8
|
+
spec.version = Acbgm::VERSION
|
9
|
+
spec.authors = ["Write your name"]
|
10
|
+
spec.email = ["Write your email address"]
|
11
|
+
|
12
|
+
spec.summary = %q{Write a short summary, because RubyGems requires one.}
|
13
|
+
spec.description = %q{Write a longer description or delete this line.}
|
14
|
+
spec.homepage = "https://nootnoot.co"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
else
|
21
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
"public gem pushes."
|
23
|
+
end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
f.match(%r{^(test|spec|features)/})
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
|
33
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "acbgm"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/acbgm.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require "acbgm/version"
|
2
|
+
|
3
|
+
module Acbgm
|
4
|
+
#!/usr/bin/env ruby
|
5
|
+
require 'gtk3'
|
6
|
+
require "audite"
|
7
|
+
|
8
|
+
time = Time.new
|
9
|
+
puts time.hour
|
10
|
+
|
11
|
+
si = Gtk::StatusIcon.new
|
12
|
+
si.stock = Gtk::Stock::DIALOG_INFO
|
13
|
+
|
14
|
+
si.pixbuf = Gdk::Pixbuf.new('kk.png')
|
15
|
+
|
16
|
+
si.tooltip_text = "It is #{time.hour}"
|
17
|
+
|
18
|
+
menu = Gtk::Menu.new
|
19
|
+
start = Gtk::ImageMenuItem.new("start")
|
20
|
+
quit = Gtk::ImageMenuItem.new(Gtk::Stock::QUIT)
|
21
|
+
|
22
|
+
quit.signal_connect('activate'){
|
23
|
+
Gtk.main_quit
|
24
|
+
abort
|
25
|
+
}
|
26
|
+
start.signal_connect('activate'){
|
27
|
+
player = Audite.new
|
28
|
+
time = Time.new
|
29
|
+
player.events.on(:complete) do
|
30
|
+
if !player.active
|
31
|
+
player.stop_stream
|
32
|
+
end
|
33
|
+
player.load("hour#{time.hour}.mp3")
|
34
|
+
player.start_stream
|
35
|
+
end
|
36
|
+
player.load("hour#{time.hour}.mp3")
|
37
|
+
player.start_stream
|
38
|
+
}
|
39
|
+
|
40
|
+
menu.append(start)
|
41
|
+
menu.append(quit)
|
42
|
+
|
43
|
+
menu.show_all
|
44
|
+
|
45
|
+
si.signal_connect('popup-menu') do |icon, button, time|
|
46
|
+
menu.popup(nil, nil, button, time)
|
47
|
+
end
|
48
|
+
|
49
|
+
Gtk.main
|
50
|
+
|
51
|
+
end
|
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: acbgm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Write your name
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Write a longer description or delete this line.
|
14
|
+
email:
|
15
|
+
- Write your email address
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".gitignore"
|
21
|
+
- Gemfile
|
22
|
+
- README.md
|
23
|
+
- Rakefile
|
24
|
+
- acbgm.gemspec
|
25
|
+
- bin/console
|
26
|
+
- bin/setup
|
27
|
+
- lib/acbgm.rb
|
28
|
+
- lib/acbgm/version.rb
|
29
|
+
homepage: https://nootnoot.co
|
30
|
+
licenses: []
|
31
|
+
metadata:
|
32
|
+
allowed_push_host: https://rubygems.org
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
requirements: []
|
48
|
+
rubyforge_project:
|
49
|
+
rubygems_version: 2.6.14
|
50
|
+
signing_key:
|
51
|
+
specification_version: 4
|
52
|
+
summary: Write a short summary, because RubyGems requires one.
|
53
|
+
test_files: []
|