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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66490781d279ddc675a08efc2a78fa67e8a241d7
4
- data.tar.gz: b55758cc8f3e16e19840b0806ddecfebe7264736
3
+ metadata.gz: 43a0c31457f9af8fe8edfeb32242187cf8a1089d
4
+ data.tar.gz: c0ffea9609ed5afde0199beadf2654378d1b37be
5
5
  SHA512:
6
- metadata.gz: e1d239df0a79c845030c167949a3996c13ca9a87dfc4fb6edd3ab72b821d2caea4cada2e27d1fc48e17d17cf6069de1b12113ea1a03074ec46179602db4a6765
7
- data.tar.gz: fd5077936291ff971eafb969e50c6397a091af3bb649a1064ca3e3dae88eaabed8e010f26e07ac34ea79f82ddccb35a460fcfb0c95ff373a3604ad88d1ada451
6
+ metadata.gz: ede1c8ca083d66627f4265000f195ac8c8e927ebc23f708bf6bc63dfa995ca5e5fc006886bb2f0e64754f5121f42fc276eb46b0ea2fffe19c9dc7f9c49dc65bf
7
+ data.tar.gz: 1ec854e7ed3a45a1068cbf03dea5f0a85601ea60cbfad3ccddd74b6bfe9c6447aae96ca69a949e431f3ff56cdcc197248de13c5fc53a9280a31f69bee9f7601f
data/.gitignore CHANGED
@@ -9,4 +9,6 @@
9
9
  /tmp/
10
10
 
11
11
  /.idea
12
- spec/credentials.yml
12
+ spec/credentials.yml
13
+
14
+ *.gem
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
- TODO: Write usage instructions here
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
@@ -3,6 +3,7 @@ require "watir-webdriver"
3
3
  require "ostruct"
4
4
  require 'ostruct'
5
5
  require 'json'
6
+ require 'pathname'
6
7
 
7
8
  module Targetmy
8
9
  def self.root
@@ -1,3 +1,3 @@
1
1
  module Targetmy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: targetmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dimag