ongaku_ryoho_server 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,6 @@ pid_file = "#{gem_dir}/../tmp/#{OngakuRyohoServer::List.get_digest}.pid"
14
14
 
15
15
  # puma arguments
16
16
  argv = ARGV
17
- argv << ["--pidfile", pid_file] unless ARGV.include?("--pidfile")
18
17
  argv << ["-e", "production"] unless ARGV.include?("-e")
19
18
  argv << ["-p", "7000"] unless ARGV.include?("-p")
20
19
 
@@ -30,8 +29,8 @@ puma_cli = Puma::CLI.new(argv.flatten)
30
29
 
31
30
  # keep options
32
31
  OngakuRyohoServer::OPTIONS = {
33
- update_collection: update_collection,
34
- puma: puma_cli.instance_variable_get("@options")
32
+ :update_collection => update_collection,
33
+ :puma => puma_cli.instance_variable_get("@options")
35
34
  }
36
35
 
37
36
  # exec puma
data/history.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.3.2 / 2012-11-17
2
+
3
+ * ruby 1.8.7 support
4
+ * remove pid file thing
5
+
6
+
1
7
  === 0.3.1 / 2012-11-16
2
8
 
3
9
  * use puma instead of thin (better streaming support, daemonizing coming soon)
@@ -1,3 +1,5 @@
1
+ require "sinatra/base"
2
+
1
3
  module OngakuRyohoServer
2
4
  #
3
5
  # { Application }
@@ -31,6 +33,7 @@ module OngakuRyohoServer
31
33
 
32
34
  # music file
33
35
  get %r{.(#{FILE_FORMATS.join("|")})$}i do
36
+ require "uri"
34
37
  requested_item = URI.unescape(request.path_info[1..-1])
35
38
  File.exists?(requested_item) ? send_file(requested_item) : 404
36
39
  end
@@ -17,6 +17,7 @@ module OngakuRyohoServer
17
17
  # => Creates a digest from the path of the current directory
18
18
  #
19
19
  def self.get_digest
20
+ require "digest/sha1"
20
21
  digested_path = Digest::SHA1.hexdigest(Dir.pwd)
21
22
  end
22
23
 
@@ -43,12 +43,12 @@ module OngakuRyohoServer
43
43
  new_files = file_list_from_current_directory - file_list
44
44
 
45
45
  new_tracks = OngakuRyohoServer::Process.files(
46
- new_files, { last_modified: Time.now }
46
+ new_files, { :last_modified => Time.now }
47
47
  )
48
48
 
49
49
  return {
50
- missing_files: missing_files,
51
- new_tracks: new_tracks
50
+ :missing_files => missing_files,
51
+ :new_tracks => new_tracks
52
52
  }
53
53
  end
54
54
 
@@ -72,7 +72,7 @@ module OngakuRyohoServer
72
72
  # loop over every track
73
73
  file_list.each do |location|
74
74
  rpartition = location.rpartition("/")
75
- filename = rpartition[2]
75
+ filename = rpartition[2]
76
76
 
77
77
  track = {}
78
78
 
@@ -80,19 +80,19 @@ module OngakuRyohoServer
80
80
  tag = fileref.tag
81
81
 
82
82
  tags = {
83
- title: tag.title,
84
- artist: tag.artist,
85
- album: tag.album,
86
- year: tag.year,
87
- track: tag.track,
88
- genre: tag.genre
83
+ :title => tag.title,
84
+ :artist => tag.artist,
85
+ :album => tag.album,
86
+ :year => tag.year,
87
+ :track => tag.track,
88
+ :genre => tag.genre
89
89
  }
90
90
 
91
91
  tags.each do |key, value|
92
92
  tags[key] = "Unknown" if value.nil? or (value.respond_to?(:empty) and value.empty?)
93
93
  end
94
94
 
95
- tags.merge!({ filename: filename, location: location })
95
+ tags.merge!({ :filename => filename, :location => location })
96
96
 
97
97
  track = tags.clone
98
98
  end
@@ -1,13 +1,5 @@
1
- require "sinatra/base"
2
- require "taglib"
3
-
4
- require "json"
5
- require "uri"
6
- require "digest/sha1"
7
-
8
- require_relative "ongaku_ryoho_server/version"
9
- require_relative "ongaku_ryoho_server/process"
10
- require_relative "ongaku_ryoho_server/list"
11
- require_relative "ongaku_ryoho_server/application"
1
+ require "ongaku_ryoho_server/process"
2
+ require "ongaku_ryoho_server/list"
3
+ require "ongaku_ryoho_server/application"
12
4
 
13
5
  module OngakuRyohoServer; end
@@ -1,24 +1,26 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/ongaku_ryoho_server/version', __FILE__)
3
2
 
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Steven Vandevelde"]
6
- gem.email = ["icid.asset@gmail.com"]
7
- gem.description = %q{Serves music to Ongaku Ryoho clients}
8
- gem.summary = %q{Serves music to Ongaku Ryoho clients}
9
- gem.homepage = "https://github.com/icidasset/ongaku_ryoho_server"
3
+ Gem::Specification.new do |s|
4
+ s.name = "ongaku_ryoho_server"
5
+ s.version = "0.3.2"
10
6
 
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "ongaku_ryoho_server"
15
- gem.require_paths = ["lib"]
16
- gem.version = OngakuRyohoServer::VERSION
7
+ s.authors = ["Steven Vandevelde"]
8
+ s.email = ["icid.asset@gmail.com"]
9
+ s.description = "Serves music to Ongaku Ryoho clients"
10
+ s.summary = "Serves music to Ongaku Ryoho clients"
11
+ s.homepage = "https://github.com/icidasset/ongaku_ryoho_server"
17
12
 
18
- gem.add_dependency 'json', '~> 1.7.5'
19
- gem.add_dependency 'taglib-ruby', '~> 0.5.2'
20
- gem.add_dependency 'sinatra', '~> 1.3.3'
21
- gem.add_dependency 'puma', '~> 1.6.3'
13
+ s.files = `git ls-files`.split($\)
14
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
22
16
 
23
- gem.add_development_dependency 'rake'
17
+ s.require_paths = ["lib"]
18
+ s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
19
+
20
+ s.add_dependency "json", "~> 1.7.5"
21
+ s.add_dependency "taglib-ruby", "~> 0.5.2"
22
+ s.add_dependency "sinatra", "~> 1.3.3"
23
+ s.add_dependency "puma", "~> 1.6.3"
24
+
25
+ s.add_development_dependency "rake"
24
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ongaku_ryoho_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -111,7 +111,6 @@ files:
111
111
  - lib/ongaku_ryoho_server/config.ru
112
112
  - lib/ongaku_ryoho_server/list.rb
113
113
  - lib/ongaku_ryoho_server/process.rb
114
- - lib/ongaku_ryoho_server/version.rb
115
114
  - ongaku_ryoho_server.gemspec
116
115
  homepage: https://github.com/icidasset/ongaku_ryoho_server
117
116
  licenses: []
@@ -124,10 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
123
  requirements:
125
124
  - - ! '>='
126
125
  - !ruby/object:Gem::Version
127
- version: '0'
128
- segments:
129
- - 0
130
- hash: -3003266274688567412
126
+ version: 1.8.7
131
127
  required_rubygems_version: !ruby/object:Gem::Requirement
132
128
  none: false
133
129
  requirements:
@@ -136,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
132
  version: '0'
137
133
  segments:
138
134
  - 0
139
- hash: -3003266274688567412
135
+ hash: -71336546807028651
140
136
  requirements: []
141
137
  rubyforge_project:
142
138
  rubygems_version: 1.8.24
@@ -1,6 +0,0 @@
1
- module OngakuRyohoServer
2
- #
3
- # { VERSION }
4
-
5
- VERSION = "0.3.1"
6
- end