targetmy 0.1.0 → 0.1.1
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 +4 -4
- data/.gitignore +3 -1
- data/README.md +34 -7
- data/lib/targetmy.rb +1 -0
- data/lib/targetmy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a0c31457f9af8fe8edfeb32242187cf8a1089d
|
4
|
+
data.tar.gz: c0ffea9609ed5afde0199beadf2654378d1b37be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ede1c8ca083d66627f4265000f195ac8c8e927ebc23f708bf6bc63dfa995ca5e5fc006886bb2f0e64754f5121f42fc276eb46b0ea2fffe19c9dc7f9c49dc65bf
|
7
|
+
data.tar.gz: 1ec854e7ed3a45a1068cbf03dea5f0a85601ea60cbfad3ccddd74b6bfe9c6447aae96ca69a949e431f3ff56cdcc197248de13c5fc53a9280a31f69bee9f7601f
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
# Targetmy
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/targetmy`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
1
|
## Installation
|
8
2
|
|
9
3
|
Add this line to your application's Gemfile:
|
@@ -22,7 +16,40 @@ Or install it yourself as:
|
|
22
16
|
|
23
17
|
## Usage
|
24
18
|
|
25
|
-
|
19
|
+
Please download the driver from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH.
|
20
|
+
```ruby
|
21
|
+
require 'targetmy'
|
22
|
+
|
23
|
+
config = [{
|
24
|
+
type: :site,
|
25
|
+
link: "example.com",
|
26
|
+
adv_products: {
|
27
|
+
type: :teaser,
|
28
|
+
campaign_name: 'example',
|
29
|
+
ads: [{
|
30
|
+
title: 'title',
|
31
|
+
text: 'text',
|
32
|
+
image: '/path/to/image.png'
|
33
|
+
},{
|
34
|
+
title: 'title2',
|
35
|
+
text: 'text2',
|
36
|
+
image: '/path/to/image.png'
|
37
|
+
}]
|
38
|
+
}
|
39
|
+
}]
|
40
|
+
|
41
|
+
robot = Targetmy::Robot.new config: config
|
42
|
+
robot.start("email", "password")
|
43
|
+
```
|
44
|
+
To display supported and mandatory config keys:
|
45
|
+
```ruby
|
46
|
+
p Targetmy::Config::SUPPORTED_ADV_TYPES
|
47
|
+
p Targetmy::Config::Site::REQUIRED_KEYS
|
48
|
+
p Targetmy::Config::Site::SUPPORTED_KEYS
|
49
|
+
p Targetmy::Config::Site::SUPPORTED_ADV_PRODUCTS
|
50
|
+
p Targetmy::Config::Site::SUPPORTED_ADV_PRODUCTS
|
51
|
+
p Targetmy::Config::Site::Teaser::REQUIRED_KEYS
|
52
|
+
```
|
26
53
|
|
27
54
|
## Development
|
28
55
|
|
data/lib/targetmy.rb
CHANGED
data/lib/targetmy/version.rb
CHANGED