atomic-parsley-ruby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2833e88dac24eba50cb1081be4705c84ed96e2b
4
- data.tar.gz: 25acd2819c2b96f70957e9b5f4c33c9fe3621ff6
3
+ metadata.gz: d3c10431a73334383bf17f1912b177f118ea28c5
4
+ data.tar.gz: b2d2ab5f61caf35083d79ea685688f27c883c802
5
5
  SHA512:
6
- metadata.gz: ff24b3debd95ad9e4832fe2075d27f6a2b649b11f6789898a5b68a2ae83c5f41e24288629ebdf0286b4a627dc3fdc81e901e5ae8a3ec11277faa769c269a6199
7
- data.tar.gz: 3e88aaecce2d5e823fb1d8e3abd9344d8f75ea6ebf78bc26690914ce44a84392d38d239fb80c62c17eed5e7941e7ba20bbc612268a8e02d5ffa0ba01c4a04678
6
+ metadata.gz: fa1e86676f0d1327de64028470949c24d46e47f75c33400fb7b254fa83d809c761a019cb85011dad81bfeefc1ce06027e3c2ff7c8088af0cb08a3222c81b980d
7
+ data.tar.gz: 5d267c40e98f5ab50b189aee8271c1de9025b2b14c003564a8ad4e3ef14ed48e298431e3681141d57aecda00edad10092de5a0a510e5dcbe7b9e22e84c10cfe3
data/README.md CHANGED
@@ -64,6 +64,7 @@ Or install it yourself as:
64
64
  # xid (string) Set the vendor-supplied iTunes xID (see --longhelp)
65
65
  # gapless (boolean) Set the gapless playback flag
66
66
  # contentRating (string) Set tv/mpaa rating (see -rDNS-help)
67
+ # overwrite (boolean) Overwrite media file, instead of create a temp file (true or false) (default: false)
67
68
 
68
69
  v = AtomicParsleyRuby::Media.new("test.mp4")
69
70
 
@@ -5,9 +5,14 @@ module AtomicParsleyRuby
5
5
 
6
6
  def initialize(file_name)
7
7
  @file = ::Shellwords.escape(file_name)
8
+ @overwrite = false
8
9
  @params = {}
9
10
  end
10
-
11
+
12
+ def overwrite(val)
13
+ @overwrite = val
14
+ end
15
+
11
16
  # --artist (string) Set the artist tag\n"
12
17
  # --title (string) Set the title tag\n"
13
18
  # --album (string) Set the album tag\n"
@@ -47,8 +52,7 @@ module AtomicParsleyRuby
47
52
  # --xid (string) Set the vendor-supplied iTunes xID (see --longhelp)\n"
48
53
  # --gapless (boolean) Set the gapless playback flag\n"
49
54
  # --contentRating (string*) Set tv/mpaa rating (see -rDNS-help)\n"
50
-
51
-
55
+
52
56
  [:artist, :title, :album,
53
57
  :genre, :tracknum, :disk,
54
58
  :comment, :year, :lyrics,
@@ -91,6 +95,9 @@ module AtomicParsleyRuby
91
95
  unless @params.empty?
92
96
  ret << " #{@file}"
93
97
  @params.each {|flag, arg| ret << " #{flag} #{arg}"}
98
+ if @overwrite
99
+ ret << " --overWrite"
100
+ end
94
101
  end
95
102
  ret
96
103
  end
@@ -1,3 +1,3 @@
1
1
  module AtomicParsleyRuby
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -24,6 +24,21 @@ module AtomicParsleyRuby
24
24
  end
25
25
  end
26
26
 
27
+ it "responds to overwrite true" do
28
+ ::AtomicParsleyRuby::Dependency.stubs(:path).returns("AtomicParsley")
29
+ v = Media.new("test.mp4")
30
+ v.send(:artist, "test-value")
31
+ v.overwrite true
32
+ v.cmd.should eq "AtomicParsley test.mp4 --artist test-value --overWrite"
33
+ end
34
+
35
+ it "responds to overwrite true only with other flags" do
36
+ ::AtomicParsleyRuby::Dependency.stubs(:path).returns("AtomicParsley")
37
+ v = Media.new("test.mp4")
38
+ v.overwrite true
39
+ v.cmd.should eq "AtomicParsley"
40
+ end
41
+
27
42
  it "sets multiple flags using the encode block" do
28
43
  ::AtomicParsleyRuby::Dependency.stubs(:path).returns("AtomicParsley")
29
44
  v = Media.new("test.mp4")
@@ -35,6 +50,5 @@ module AtomicParsleyRuby
35
50
  end
36
51
  v.cmd.should eq "AtomicParsley test.mp4 --artist Some\\ Guy --year 2012 --genre Punk\\ Rock test.mp4 --artist Some\\ Guy --year 2012 --genre Punk\\ Rock"
37
52
  end
38
-
39
53
  end
40
54
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic-parsley-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - cparratto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-27 00:00:00.000000000 Z
11
+ date: 2014-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mocha
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: A wrapper api for the atomicparsley cli
@@ -73,8 +73,8 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".travis.yml"
78
78
  - Gemfile
79
79
  - LICENSE.txt
80
80
  - README.md
@@ -100,17 +100,17 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.0.3
113
+ rubygems_version: 2.2.2
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: I take no major credit for this its simply just a wrapper for the c application