rsgt 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.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +6 -0
  5. data/README.markdown +139 -0
  6. data/Rakefile +10 -0
  7. data/bin/rsgt +5 -0
  8. data/lib/rsgt.rb +42 -0
  9. data/lib/rsgt/audio_extractor.rb +25 -0
  10. data/lib/rsgt/cli.rb +89 -0
  11. data/lib/rsgt/command_runner.rb +41 -0
  12. data/lib/rsgt/encrypted_steam_file.rb +44 -0
  13. data/lib/rsgt/multipacker.rb +114 -0
  14. data/lib/rsgt/multipacker/config_processor.rb +44 -0
  15. data/lib/rsgt/repacker.rb +37 -0
  16. data/lib/rsgt/rs_custom_song_toolkit.rb +41 -0
  17. data/lib/rsgt/saved_game.rb +37 -0
  18. data/lib/rsgt/saved_game/learn_a_song/song.rb +46 -0
  19. data/lib/rsgt/saved_game/score_attack/song.rb +38 -0
  20. data/lib/rsgt/saved_game/song_collection.rb +16 -0
  21. data/lib/rsgt/saved_game/statistics.rb +91 -0
  22. data/lib/rsgt/saved_game/statistics/song.rb +58 -0
  23. data/lib/rsgt/steam.rb +45 -0
  24. data/lib/rsgt/unpacked_psarc.rb +72 -0
  25. data/lib/rsgt/version.rb +3 -0
  26. data/lib/rsgt/vocals_extractor.rb +24 -0
  27. data/lib/rsgt/wav_shifter.rb +54 -0
  28. data/lib/rsgt/wwise_converter.rb +99 -0
  29. data/rsgt.gemspec +31 -0
  30. data/spec/lib/rsgt/audio_extractor_spec.rb +14 -0
  31. data/spec/lib/rsgt/command_runner_spec.rb +37 -0
  32. data/spec/lib/rsgt/repacker_spec.rb +24 -0
  33. data/spec/lib/rsgt/rs_custom_song_toolkit_spec.rb +47 -0
  34. data/spec/lib/rsgt/saved_game/learn_a_song/song_spec.rb +15 -0
  35. data/spec/lib/rsgt/saved_game_spec.rb +49 -0
  36. data/spec/lib/rsgt/unpacked_psarc_spec.rb +35 -0
  37. data/spec/lib/rsgt/vocals_extractor_spec.rb +14 -0
  38. data/spec/lib/rsgt/wav_shifter_spec.rb +30 -0
  39. data/spec/lib/rsgt/wwise_converter_spec.rb +22 -0
  40. data/spec/spec_helper.rb +11 -0
  41. metadata +168 -0
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe RSGuitarTech::UnpackedPSARC do
4
+ let(:psarc) { "foo_m.psarc" }
5
+ let(:opts) { {} }
6
+
7
+ describe ".from_psarc" do
8
+ it "requires a block" do
9
+ expect {
10
+ described_class.from_psarc psarc, opts
11
+ }.to raise_error ArgumentError, "A block is required"
12
+ end
13
+ end
14
+
15
+ describe "#repack!" do
16
+ end
17
+
18
+ describe "#expected_extraction" do
19
+ end
20
+
21
+ describe "#manifest" do
22
+ end
23
+
24
+ describe "#sng_bin" do
25
+ end
26
+
27
+ describe "#sng_xml" do
28
+ end
29
+
30
+ describe "#audio_track" do
31
+ end
32
+
33
+ describe "#ogg_track" do
34
+ end
35
+ end
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ describe RSGuitarTech::VocalsExtractor do
4
+ let(:extractor) { described_class.new psarc: psarc }
5
+ let(:psarc) { "foo_m.psarc" }
6
+
7
+ describe "#extract!" do
8
+ it "extracts" do
9
+ allow(extractor).to receive :puts
10
+ expect(RSGuitarTech::UnpackedPSARC).to receive :from_psarc
11
+ extractor.extract!
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,30 @@
1
+ require "spec_helper"
2
+
3
+ describe RSGuitarTech::WavShifter do
4
+ let(:shifter) { described_class.new wav: "foo.wav", dir: direction, amount: 30 }
5
+ let(:shift!) { shifter.shift! }
6
+
7
+ before { allow(shifter).to receive :puts }
8
+
9
+ describe "convert!" do
10
+ context "forward" do
11
+ let(:direction) { "forward" }
12
+
13
+ it "can't go forward" do
14
+ expect { shift! }.to raise_error NotImplementedError
15
+ end
16
+ end
17
+
18
+ context "backwards" do
19
+ let(:direction) { "backward" }
20
+ let(:status) { double "status", success?: true }
21
+
22
+ it "works" do
23
+ expect(Dir).to receive(:mktmpdir).and_yield "foo_dir"
24
+ expect(RSGuitarTech::CommandRunner).to receive(:run!).and_return status
25
+ expect(FileUtils).to receive(:cp).with "foo_dir/shifted.wav", /foo\.wav/
26
+ shift!
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,22 @@
1
+ require "spec_helper"
2
+
3
+ describe RSGuitarTech::WWiseConverter do
4
+ let(:converter) { described_class.new source_file, opts }
5
+ let(:source_file) { "foo.wav" }
6
+ let(:opts) { {wwise_ver: wwise_ver, quality: quality, chorus: chorus} }
7
+ let(:wwise_ver) { "2017" }
8
+ let(:quality) { "3" }
9
+ let(:chorus) { "30" }
10
+
11
+ describe "convert!" do
12
+ it "blahs" do
13
+ expect(Dir).to receive(:mktmpdir).and_yield "foo_dir"
14
+ expect(RSGuitarTech::CommandRunner).to receive(:run!).at_least :once
15
+ expect(FileUtils).to receive(:cp).with "foo.wav", "foo_dir/Template/Originals/SFX/Audio.wav"
16
+
17
+ converter.convert! do |hi|
18
+ expect(hi.source_file).to eq "foo.wav"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,11 @@
1
+ require "rsgt"
2
+
3
+ unless ENV["NO_COVERALLS"]
4
+ require "coveralls"
5
+ Coveralls.wear!
6
+ end
7
+
8
+ RSpec.configure do |config|
9
+ config.filter_run :focus
10
+ config.run_all_when_everything_filtered = true
11
+ end
metadata ADDED
@@ -0,0 +1,168 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rsgt
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Justin Aiken
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bindata
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: trollop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rainbow
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.5'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.5'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Rocksmith
98
+ email:
99
+ - 60tonangel@gmail.com
100
+ executables:
101
+ - rsgt
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - Gemfile
108
+ - README.markdown
109
+ - Rakefile
110
+ - bin/rsgt
111
+ - lib/rsgt.rb
112
+ - lib/rsgt/audio_extractor.rb
113
+ - lib/rsgt/cli.rb
114
+ - lib/rsgt/command_runner.rb
115
+ - lib/rsgt/encrypted_steam_file.rb
116
+ - lib/rsgt/multipacker.rb
117
+ - lib/rsgt/multipacker/config_processor.rb
118
+ - lib/rsgt/repacker.rb
119
+ - lib/rsgt/rs_custom_song_toolkit.rb
120
+ - lib/rsgt/saved_game.rb
121
+ - lib/rsgt/saved_game/learn_a_song/song.rb
122
+ - lib/rsgt/saved_game/score_attack/song.rb
123
+ - lib/rsgt/saved_game/song_collection.rb
124
+ - lib/rsgt/saved_game/statistics.rb
125
+ - lib/rsgt/saved_game/statistics/song.rb
126
+ - lib/rsgt/steam.rb
127
+ - lib/rsgt/unpacked_psarc.rb
128
+ - lib/rsgt/version.rb
129
+ - lib/rsgt/vocals_extractor.rb
130
+ - lib/rsgt/wav_shifter.rb
131
+ - lib/rsgt/wwise_converter.rb
132
+ - rsgt.gemspec
133
+ - spec/lib/rsgt/audio_extractor_spec.rb
134
+ - spec/lib/rsgt/command_runner_spec.rb
135
+ - spec/lib/rsgt/repacker_spec.rb
136
+ - spec/lib/rsgt/rs_custom_song_toolkit_spec.rb
137
+ - spec/lib/rsgt/saved_game/learn_a_song/song_spec.rb
138
+ - spec/lib/rsgt/saved_game_spec.rb
139
+ - spec/lib/rsgt/unpacked_psarc_spec.rb
140
+ - spec/lib/rsgt/vocals_extractor_spec.rb
141
+ - spec/lib/rsgt/wav_shifter_spec.rb
142
+ - spec/lib/rsgt/wwise_converter_spec.rb
143
+ - spec/spec_helper.rb
144
+ homepage: https://github.com/JustinAiken/rsgt
145
+ licenses:
146
+ - MIT
147
+ metadata: {}
148
+ post_install_message:
149
+ rdoc_options: []
150
+ require_paths:
151
+ - lib
152
+ required_ruby_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ requirements: []
163
+ rubyforge_project: rsgt
164
+ rubygems_version: 2.6.13
165
+ signing_key:
166
+ specification_version: 4
167
+ summary: Rocksmith
168
+ test_files: []