insite 0.2.3 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63e184f9aec996f76dcdcff1a0ee71f2b56c88523f92681c4d36f18faf614001
4
- data.tar.gz: 7340f99e41bd7037a20a82bf1db9ef83ffae48be4dbaa3a62af3ac1e1681500c
3
+ metadata.gz: a68396a261c66b3cb67524ff47c0bb3f6a17f21807d093175b1a73c293147eae
4
+ data.tar.gz: ea60b9b3bb3b67f566c9ca75346a886ba98e828298be6eb72989b07b91f930ee
5
5
  SHA512:
6
- metadata.gz: 58869a57afe8f2cd885b37a2c5cc34e60950adc31f5c7c57013c11f424fe52ada234db4da94d98510d96e1d27c81871d6958751b0ade6da16879a248ad7b186d
7
- data.tar.gz: 24b267fa3b02d15070e815aa62805da01686a2be35d819e2ae42137cd8cc5506acf08dec074dd8614e10f36329ed7a11baa459fb0397a0fb9dc06ae7d8b89b8a
6
+ metadata.gz: 5a73e9efe53bc038eb8ff4b67269227ff34720b6aaa9060dadec600a9144bd7edcf9a132f700da5f1235afa291436a0ca096072f585516506a567cccfb831933
7
+ data.tar.gz: d175a8a0c4eb3829393b203a17c0fbd7c64ec327430afefeb71f12a6585b69eb10428c05f28b387757dff891a7681ff3a9c560b980d067395396e3743e0870c9
@@ -117,8 +117,15 @@ module Insite
117
117
  # => 1
118
118
  # TODO: Sort args.
119
119
  def initialize(base_url = nil, hsh={})
120
+ if hsh.include?(:scheme)
121
+ @arguments = hsh.with_indifferent_access
122
+ else
123
+ base_url.match(/(https|http)/i)
124
+ scheme = $1 || 'https'
125
+ @arguments = hsh.merge({scheme: scheme}).with_indifferent_access
126
+ end
127
+
120
128
  @site = self
121
- @arguments = hsh.merge({scheme: 'https'}).with_indifferent_access
122
129
  @base_url = base_url
123
130
  @browser_type = (@arguments[:browser] ? @arguments[:browser].to_sym : nil)
124
131
 
@@ -1,3 +1,3 @@
1
1
  module Insite
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Fitisoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-13 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport