bit_player 0.4.4 → 0.4.9

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: 93668073bd4cd59d4ff144df3da7928526edd42a
4
- data.tar.gz: 3fd3091fec7e265fc5e97f1216b90693d6f52f67
3
+ metadata.gz: 9a7e4605f9077016c7cafc9231c5e904b8b9c3e0
4
+ data.tar.gz: ceb523c187fdf1576d3528e5b8a6d8ba4f8674fd
5
5
  SHA512:
6
- metadata.gz: 5c409e5d32101ee17db89b651cff1f13f9729252bf6fcf46e0aedc6b794fceb7a1b61343dda2ca2743302c034f86b3623b4dc71e24c28ed10d5d83ce326a2a95
7
- data.tar.gz: a660160524c372a13b09ff6f05e7b3a6ae25b64d022f444c4f41b0b2b6c84e3fdfed662103f1132d4e6616ed72fcf4bcf65a4b30d8ac6a00ae7882d84610081b
6
+ metadata.gz: d5fe18a2a3e5a11f93241e132ced19f0a18badff9d60b49bb273721fda9d082b12912f20db07772ffa396d865f0c041d254e2bf607b89fd75c4f5d8706e64657
7
+ data.tar.gz: 64fa0de3d1dbe29dbe4cdb17ac0b48cdd981c4c2b180ba49b8bf38b6b78e1622f0a9f2e408d0270fb7854d54b0f4f22aa62e07d64ca1fc5aa9ba3df572469841
data/README.md CHANGED
@@ -4,10 +4,13 @@
4
4
 
5
5
  gem install bit-player
6
6
 
7
- ## Run tests
7
+ ## Create and migrate the database
8
8
 
9
- bin/rake app:db:drop app:db:create app:db:migrate RAILS_ENV=test
10
- bin/rspec
9
+ bin/rake db:create db:migrate
10
+
11
+ ## Run specs and linters
12
+
13
+ bin/rake
11
14
 
12
15
  ## Build the gem
13
16
 
data/Rakefile CHANGED
@@ -18,4 +18,18 @@ require 'rspec/core/rake_task'
18
18
  desc "Run all specs in spec directory (excluding plugin specs)"
19
19
  RSpec::Core::RakeTask.new(:spec => "app:db:test:prepare")
20
20
 
21
- task :default => :spec
21
+ require 'rubocop/rake_task'
22
+
23
+ RuboCop::RakeTask.new
24
+
25
+ desc 'Run Brakeman'
26
+ task :brakeman do
27
+ dir = File.dirname(__FILE__)
28
+ puts `#{ File.join(dir, 'bin', 'brakeman') } #{ File.join(dir, '.') }`
29
+ end
30
+
31
+ task :default do
32
+ Rake::Task['rubocop'].invoke
33
+ Rake::Task['brakeman'].invoke
34
+ Rake::Task['spec'].invoke
35
+ end
@@ -29,7 +29,7 @@ module BitPlayer
29
29
  end
30
30
 
31
31
  def self.view_type(type)
32
- unless ["new", "edit"].include?(type)
32
+ unless %w( new edit ).include?(type)
33
33
  fail("view type must be one of 'new', 'edit'")
34
34
  end
35
35
  @view_type = type
@@ -29,7 +29,7 @@ module BitPlayer
29
29
  end
30
30
 
31
31
  def self.view_type(type)
32
- unless ["show", "index"].include?(type)
32
+ unless %w( show index ).include?(type)
33
33
  fail("view type must be one of 'show', 'index'")
34
34
  end
35
35
  @view_type = type
@@ -55,9 +55,9 @@ module BitPlayer
55
55
  end
56
56
 
57
57
  def fetch_previous_content
58
- if previous_content?
59
- @status.decrement_content_position
60
- end
58
+ return unless previous_content?
59
+
60
+ @status.decrement_content_position
61
61
  end
62
62
 
63
63
  def previous_content?
@@ -83,9 +83,10 @@ module BitPlayer
83
83
 
84
84
  def current_module
85
85
  @current_module ||= nil
86
+ arm = @participant.active_group.arm
86
87
 
87
88
  module_attrs = {
88
- bit_core_tool_id: BitCore::Tool.find_by_title(context).try(:id),
89
+ bit_core_tool_id: arm.bit_core_tools.find_by_title(context).try(:id),
89
90
  position: module_position
90
91
  }
91
92
 
@@ -1,4 +1,5 @@
1
1
  module BitPlayer
2
+ # Mountable application.
2
3
  class Engine < ::Rails::Engine
3
4
  isolate_namespace BitPlayer
4
5
 
@@ -1,3 +1,4 @@
1
+ # nodoc
1
2
  module BitPlayer
2
- VERSION = "0.4.4"
3
+ VERSION = "0.4.9"
3
4
  end