sushi_fabric 0.8.3 → 0.8.4

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: 150452cfd0d1ad4d3092688240ba78fc79f5ae7e
4
- data.tar.gz: 44c952b2d91cb717fdf02a92e03c058c35e13ef0
3
+ metadata.gz: e4c7b5fcde01ea3654ab10a7db4e9554d0728539
4
+ data.tar.gz: 145432aba1ff085edfbc06bd76afc3373edb48d9
5
5
  SHA512:
6
- metadata.gz: 616bccfefdca8138379e31a089bc3dbe8bbda0588b90d8d7b5799bceeba02f4eaa62d13e506ad7475514e939dafcfb0c14b8b095c059c58a2c7ef721bca61d76
7
- data.tar.gz: 3acf2e05715fc647ed380fbf1addc7ca651fdd582dd82557815bc5b9e8148e64e4d5714dc4e52aca94158a1a49957c3a78065871b9e702c1ab2d526d3c5ba7f6
6
+ metadata.gz: ca376d647d17f2614b77ee8cf5cea51a835c4c73d38acc995c0abede7ee4f4e56bb3c4b580ed461b32180e75f8956da4fb4e3df96e5350db3e4f9f4922559f67
7
+ data.tar.gz: aea0686f9f639cc4dc4da0fa10caef2846a83b1a7acec94131daa63f9e140506b967b72d7e9dbe42bca126b895694887c5e79abce46d4a623e912fca3ddb2597
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ config/environments/production.rb
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20170929-083439'
3
+ # Version = '20180209-144924'
4
4
 
5
5
  require 'csv'
6
6
  require 'fileutils'
@@ -8,6 +8,7 @@ require 'yaml'
8
8
  require 'drb/drb'
9
9
  gem 'rails'
10
10
  require 'rails/all'
11
+ require 'google-analytics-rails'
11
12
 
12
13
  module SushiFabric
13
14
  class Application < Rails::Application
@@ -29,6 +30,7 @@ module SushiFabric
29
30
  else
30
31
  FileUtils.mkdir_p File.dirname(config_file)
31
32
  open(config_file+'.rb', "w") do |out|
33
+ default_root = Rails.root||Dir.pwd
32
34
  out.print <<-EOF
33
35
  module SushiFabric
34
36
  class Application < Rails::Application
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -16,6 +16,8 @@
16
16
  # users commonly want.
17
17
  #
18
18
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ require 'simplecov'
20
+ SimpleCov.start
19
21
  RSpec.configure do |config|
20
22
  # rspec-expectations config goes here. You can use an alternate
21
23
  # assertion/expectation library such as wrong or the stdlib/minitest
@@ -4,6 +4,76 @@
4
4
  require './lib/sushi_fabric/sushiApp'
5
5
 
6
6
  include SushiFabric
7
+ describe "Array monkey patch" do
8
+ describe "[1,'a',2,'b'].to_h" do
9
+ subject(:array_to_h){[1,"a",2,"b"].to_h}
10
+ let(:hash){{1=>"a", 2=>"b"}}
11
+ it {is_expected.to eq hash}
12
+ end
13
+ end
14
+
15
+ describe "Hash monkey patch" do
16
+ subject(:hash){{}}
17
+ context "hash.set(1, 'a')" do
18
+ describe "hash.get(1)" do
19
+ before{hash.set(1, 'a')}
20
+ specify{expect(hash.get(1)).to eq 'a'}
21
+ end
22
+ end
23
+ context "hash[1, 'desc']='test'" do
24
+ describe "hash[1, 'desc']" do
25
+ before{hash[1, 'desc'] = 'test'}
26
+ subject(:target){hash[1, 'desc']}
27
+ it{is_expected.to eq 'test'}
28
+ end
29
+ end
30
+ describe "#data_type" do
31
+ context "hash[:key]=1" do
32
+ before{hash[:key]=1}
33
+ describe "hash.data_type(:key)" do
34
+ subject{hash.data_type(:key)}
35
+ it{is_expected.to eq Fixnum}
36
+ end
37
+ end
38
+ context "hash[:key]=['a',1,2,3]" do
39
+ before{hash[:key]=["a",1,2,3]}
40
+ describe "hash.data_type(:key)" do
41
+ subject{hash.data_type(:key)}
42
+ it{is_expected.to eq String}
43
+ end
44
+ end
45
+ end
46
+ describe "#default_value" do
47
+ context "hash.default_value(:key, :default_value)" do
48
+ before do
49
+ hash[:key] = 0
50
+ hash.instance_variable_set(:@defaults, {})
51
+ hash.default_value(:key, :default_value)
52
+ end
53
+ describe "hash.default_value(:key)" do
54
+ subject{hash.default_value(:key)}
55
+ it{is_expected.to eq :default_value}
56
+ end
57
+ end
58
+ end
59
+ end
60
+
61
+ describe "String monkey patch" do
62
+ describe "#tag?" do
63
+ context "string = 'Read1 [File]'" do
64
+ let(:string){"Read1 [File]"}
65
+ describe "string.tag?('File')" do
66
+ subject{string.tag?("File")}
67
+ it{is_expected.to_not be_falsey}
68
+ end
69
+ describe "string.tag?('Hoge')" do
70
+ subject{string.tag?("Hoge")}
71
+ it{is_expected.to be_falsey}
72
+ end
73
+ end
74
+ end
75
+ end
76
+
7
77
  describe SushiApp do
8
78
  subject(:sushi_app) {SushiApp.new}
9
79
  context 'when new' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sushi_fabric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Functional Genomics Center Zurich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-29 00:00:00.000000000 Z
11
+ date: 2018-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler