tunnlr_connector 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/tunnlr CHANGED
File without changes
@@ -1,12 +1,11 @@
1
1
  require 'tunnlr/connector'
2
2
  require 'tunnlr/configurator'
3
3
 
4
- module Tunnlr
5
- puts 'Loaded'
4
+ module Tunnlr
6
5
  def self.load_tasks
7
6
  Dir[File.expand_path("tasks/*.rake", File.dirname(__FILE__))].each { |ext| load ext }
8
7
  end
9
8
 
10
9
  require 'tunnlr/railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
11
10
 
12
- end
11
+ end
@@ -1,5 +1,6 @@
1
1
  require 'highline'
2
2
  require 'net/ssh'
3
+ require "net/http"
3
4
  module Tunnlr
4
5
  class Configurator
5
6
  attr_accessor :not_configured,:email,:password,:subdomain
@@ -9,10 +10,10 @@ module Tunnlr
9
10
  end
10
11
 
11
12
  def fetch(subdomain,username,password)
12
- url=URI.parse("http://#{subdomain}.tunnlr.com/configuration.yml")
13
+ url=URI.parse("https://#{subdomain}.tunnlr.com/configuration.yml")
13
14
  req = Net::HTTP::Get.new(url.path)
14
15
  req.basic_auth(username,password)
15
- res = Net::HTTP.start(url.host, url.port) {|http|
16
+ res = Net::HTTP.start(url.host, url.port, :verify_mode => OpenSSL::SSL::VERIFY_NONE, :use_ssl => url.scheme == 'https') {|http|
16
17
  http.request(req)
17
18
  }
18
19
  @configuration = res.body
@@ -40,7 +41,7 @@ module Tunnlr
40
41
  while not_configured
41
42
  begin
42
43
  get_credentials
43
- fetch(email,password)
44
+ fetch(subdomain, email,password)
44
45
  add_password
45
46
  write_config(path)
46
47
  puts "Created configuration in #{path}"
@@ -52,4 +53,4 @@ module Tunnlr
52
53
  end
53
54
 
54
55
  end
55
- end
56
+ end
@@ -0,0 +1,3 @@
1
+ require "tunnlr"
2
+ module TunnlrConnector
3
+ end
metadata CHANGED
@@ -1,100 +1,91 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tunnlr_connector
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 3
9
- version: 1.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Mike Mangino
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-04-06 00:00:00 -04:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2010-04-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: net-ssh
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 0
30
- - 15
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
31
21
  version: 2.0.15
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: highline
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 1
43
- - 5
44
- - 0
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.15
30
+ - !ruby/object:Gem::Dependency
31
+ name: highline
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
45
37
  version: 1.5.0
46
38
  type: :runtime
47
- version_requirements: *id002
48
- description: A simple plugin to make your local developnment environment available to the internet using the tunnlr.com service
49
- email:
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.0
46
+ description: A simple plugin to make your local developnment environment available
47
+ to the internet using the tunnlr.com service
48
+ email:
50
49
  - mmangino@elevatedrails.com
51
- executables:
50
+ executables:
52
51
  - tunnlr
53
52
  extensions: []
54
-
55
53
  extra_rdoc_files: []
56
-
57
- files:
54
+ files:
58
55
  - lib/tasks/tunnlr_connector_tasks.rake
59
56
  - lib/tunnlr/configurator.rb
60
57
  - lib/tunnlr/connector.rb
61
58
  - lib/tunnlr/railtie.rb
62
59
  - lib/tunnlr/ui.rb
63
60
  - lib/tunnlr.rb
61
+ - lib/tunnlr_connector.rb
64
62
  - init.rb
65
63
  - README
66
64
  - MIT-LICENSE
67
65
  - rails/init.rb
68
66
  - bin/tunnlr
69
- has_rdoc: true
70
67
  homepage: http://tunnlr.com
71
68
  licenses: []
72
-
73
69
  post_install_message:
74
70
  rdoc_options: []
75
-
76
- require_paths:
71
+ require_paths:
77
72
  - lib
78
- required_ruby_version: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- segments:
90
- - 0
91
- version: "0"
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
92
85
  requirements: []
93
-
94
86
  rubyforge_project: tunnlr_connector
95
- rubygems_version: 1.3.6
87
+ rubygems_version: 1.8.25
96
88
  signing_key:
97
89
  specification_version: 3
98
90
  summary: Provide access to the tunnlr.com service
99
91
  test_files: []
100
-