ie 0.0.0 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +7 -0
- data/ie.gemspec +25 -0
- data/lib/ie/ie.rb +77 -0
- data/lib/ie/version.rb +3 -0
- data/lib/ie.rb +4 -4
- data/spec/lib/ie_spec.rb +16 -0
- data/spec/spec_helper.rb +2 -0
- metadata +94 -12
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjBhYzIwMDFhNzI2MWE5YmQyZWFiYTI2ZTEyNzQxOTAxN2MyMWQ4Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
M2U5M2ZkM2JhNmM0N2M1YTgzOGU3YjQyZTUwNjFhODJlYzMzMzg2ZQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTY2OTU0ZjdhM2EwZmMxNGVhZmU1NjkyZDJmNTBmZTNlYWZjZTg1NDc1NjY2
|
10
|
+
ZTFiNzIyMGQ4OWNmNDkxMzE3Yjg2MDJlMjJjYzE2MzQ0ZGNhZTA1NjAxZTlh
|
11
|
+
NTE0ODgyMzcwNDRmMmRlN2ZlMzllNGMxODUwMzEzNjdmMTkyYjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGNmYzViMGMyNDY1ZWQ4NjE0MDNjNjEyNTJkNWUyZmNkYzhjZTlhNjRlNmYw
|
14
|
+
ZThiNTdkOWRkMTliNGE2MmU3NmVhNDIzZjFiMTIyYzk4YmZmNWVjZjJmZGU5
|
15
|
+
MTY2NjJkN2E2NGI5MWMzOTI1ZDZkNzQ4NzdhMGRkYzAzMTg0NjU=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Nii
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Ie
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'ie'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install ie
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( http://github.com/<my-github-username>/ie/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/ie.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ie/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ie"
|
8
|
+
spec.version = IE::VERSION
|
9
|
+
spec.authors = ["Nii"]
|
10
|
+
spec.email = ["tetteh_ideaz@gmail.com"]
|
11
|
+
spec.summary = "Summary"
|
12
|
+
spec.description = "Description"
|
13
|
+
spec.homepage = "https://rubygems.org/gems/ie"
|
14
|
+
spec.license = "TI"
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
21
|
+
spec.add_development_dependency 'rake', '~> 0.9'
|
22
|
+
spec.add_development_dependency 'rspec', '~> 2.14'
|
23
|
+
spec.add_development_dependency 'curb', '~> 0.8'
|
24
|
+
spec.add_development_dependency 'capybara', '~> 2.1'
|
25
|
+
end
|
data/lib/ie/ie.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
|
2
|
+
module IE
|
3
|
+
def self.download_ie9_vm
|
4
|
+
puts 'downloading win7 IE9 image...'
|
5
|
+
responses = {}
|
6
|
+
base_url = "http://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE9-Win7&filename=VirtualBox/IE9_Win7/Mac/IE9.Win7.For.MacVirtualBox.part"
|
7
|
+
requests = ["#{base_url}1.sfx", "#{base_url}2.rar", "#{base_url}3.rar", "#{base_url}4.rar"]
|
8
|
+
|
9
|
+
m = Curl::Multi.new
|
10
|
+
|
11
|
+
requests.each do |url|
|
12
|
+
responses[url] = ""
|
13
|
+
c = Curl::Easy.new(url) do |curl|
|
14
|
+
curl.follow_location = true
|
15
|
+
curl.on_body{|data| responses[url] << data; data.size }
|
16
|
+
curl.on_success {|easy| puts "download finished successfully" }
|
17
|
+
curl.on_failure {|easy| puts "download failed" }
|
18
|
+
end
|
19
|
+
m.add(c)
|
20
|
+
end
|
21
|
+
|
22
|
+
m.perform
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
def self.unzip_image
|
27
|
+
puts 'unziping image...'
|
28
|
+
system "chmod +x IE9.Win7.For.MacVirtualBox.part1.sfx"
|
29
|
+
system "./IE9.Win7.For.MacVirtualBox.part1.sfx"
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.check_for_vm(vm_name)
|
33
|
+
puts "checking for vm with name #{vm_name}"
|
34
|
+
system "VboxManage list vms | grep 'IE9 - Win7' | awk '{ print $1 $2 $3}'"
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.import_appliance
|
38
|
+
puts 'importing appliance'
|
39
|
+
system "VboxManage import 'IE9 - Win7.ova'"
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.clean_up
|
43
|
+
puts 'cleaning up'
|
44
|
+
system "rm *.rar *.sfx"
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
def self.setup_for_ie9
|
49
|
+
ie_vm_ip = ENV['IE9_VM_IP']
|
50
|
+
if ie_vm_ip.present?
|
51
|
+
selenium_server_url = "http://#{ie_vm_ip}:4444/wd/hub"
|
52
|
+
|
53
|
+
Capybara.register_driver :selenium do |app|
|
54
|
+
Capybara::Selenium::Driver.new(app,
|
55
|
+
:browser => :remote,
|
56
|
+
:url => selenium_server_url,
|
57
|
+
:desired_capabilities => :internet_explorer
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def override_localhost_on_vm
|
64
|
+
##get host ip
|
65
|
+
#host_ip=`ifconfig en0 inet | grep inet | awk '{print $2}'`
|
66
|
+
#echo "host ip is $host_ip"
|
67
|
+
#
|
68
|
+
##get guest ip
|
69
|
+
#guest_ip=`VBoxManage guestproperty get "IE9 - Win7" '/VirtualBox/GuestInfo/Net/0/V4/IP' | awk '{
|
70
|
+
#echo "guest ip is $guest_ip"
|
71
|
+
#
|
72
|
+
#
|
73
|
+
##create workdir
|
74
|
+
#sshpass -p Passw0rd! ssh ieuser@$guest_ip -p 2222 "mkdir workdir || echo \"directory already exists"
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
data/lib/ie/version.rb
ADDED
data/lib/ie.rb
CHANGED
data/spec/lib/ie_spec.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe IE do
|
4
|
+
describe "setup" do
|
5
|
+
before :each do
|
6
|
+
ENV.stub(:[]).with("IE9_VM_IP").and_return("1.2.3.4")
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should assign the environment variable for ie9 if it exists" do
|
10
|
+
ENV["IE9_VM_IP"].should == "1.2.3.4"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "download_ie9_vm" do
|
15
|
+
end
|
16
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,26 +1,106 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Nii
|
7
|
+
- Nii
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.9'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.14'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.14'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: curb
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: capybara
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.1'
|
83
|
+
description: Description
|
84
|
+
email:
|
85
|
+
- tetteh_ideaz@gmail.com
|
16
86
|
executables: []
|
17
87
|
extensions: []
|
18
88
|
extra_rdoc_files: []
|
19
89
|
files:
|
90
|
+
- .gitignore
|
91
|
+
- Gemfile
|
92
|
+
- LICENSE.txt
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- ie.gemspec
|
20
96
|
- lib/ie.rb
|
21
|
-
|
97
|
+
- lib/ie/ie.rb
|
98
|
+
- lib/ie/version.rb
|
99
|
+
- spec/lib/ie_spec.rb
|
100
|
+
- spec/spec_helper.rb
|
101
|
+
homepage: https://rubygems.org/gems/ie
|
22
102
|
licenses:
|
23
|
-
-
|
103
|
+
- TI
|
24
104
|
metadata: {}
|
25
105
|
post_install_message:
|
26
106
|
rdoc_options: []
|
@@ -38,8 +118,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
118
|
version: '0'
|
39
119
|
requirements: []
|
40
120
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.2.2
|
42
122
|
signing_key:
|
43
123
|
specification_version: 4
|
44
|
-
summary:
|
45
|
-
test_files:
|
124
|
+
summary: Summary
|
125
|
+
test_files:
|
126
|
+
- spec/lib/ie_spec.rb
|
127
|
+
- spec/spec_helper.rb
|