Module: StashNotifier

Defined in:
lib/stash_notifier/version.rb,
lib/stash_notifier.rb,
lib/stash_notifier/exceptions.rb,
lib/stash_notifier/http_client.rb,
lib/stash_notifier/build_result.rb

Overview

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Classes: BadRequest, BuildResult, Error, HTTPClient, Unauthorized

Constant Summary collapse

VERSION =
'2.0.0'

Class Method Summary collapse

Class Method Details

.new(args) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/stash_notifier.rb', line 22

def new(args)
  # TODO: Refactor this into private method
  build_args               = {}
  build_args[:state]       = args[:build_status]
  build_args[:key]         = args[:build_key]
  build_args[:name]        = args[:build_name]
  build_args[:url]         = args[:build_url]
  build_args[:description] = args[:build_description]

  build_result = StashNotifier::BuildResult.new(build_args)

  args[:build_result] = build_result.to_json

  StashNotifier::HTTPClient.new(args)
end